Commit Graph

6793 Commits

Author SHA1 Message Date
Corinna Vinschen 6d70255fe8 * fhandler_disk_file.cc (fhandler_disk_file::link): Drop superfluous
test for trailing dot.
	* path.h (path_conv::operator []): Remove.
2007-08-15 15:31:19 +00:00
Corinna Vinschen d85bcb4542 * fhandler_socket.cc (get_inet_addr): Use NT native functions for
accessing the file representing the local socket.
	(fhandler_socket::bind): Ditto.
	* ntdll.h: Declare NtReadFile.
2007-08-15 15:17:05 +00:00
Corinna Vinschen 3b98bacfd6 * path.cc (symlink_info::check): In case of ERROR_SHARING_VIOLATION and
ERROR_ACCESS_DENIED, try to get file attributes by using directory
	functions.
2007-08-14 16:19:13 +00:00
Corinna Vinschen cb8e4b58f5 * path.cc (fs_info::update): Correctly handle the volume root directory. 2007-08-14 15:54:45 +00:00
Corinna Vinschen 4a971ce403 * fhandler.h (fhandler_base::pc): Make public.
* fhandler_disk_file.cc (fhandler_disk_file::link): Drop extern
	declaration of stat_suffixes.  Use NT native path in debug output.
	(fhandler_base::utimes_fs): Simplify closeit case.  Use close_fs
	to close newly opened file handle.
	(fhandler_base::open_fs): Use NT native path in debug output.
	* path.cc: Throughout drop extern declaration of stat_suffixes.
	* path.h (stat_suffixes): Declare.
	* sec_acl.cc (acl_worker): Drop extern declaration of stat_suffixes.
	* times.cc (utimes_worker): Take path_conv as parameter instead of
	single-byte pathnam, drop nofollow argument, accommodate throughout.
	Compare UNICODE paths when enumerating file descriptors.  Fix
	formatting.  Use NT native path in debug output.
2007-08-14 14:48:52 +00:00
Corinna Vinschen 7d2ade3341 * mmap.cc: Call NtClose instead of CloseHandle throughout.
(CreateMapping): Drop unused last argument.  Accommodate throughout.
	(mmap64): Re-open file with execute permissions using NtOpenFile.
2007-08-13 19:44:31 +00:00
Corinna Vinschen deafd19cea * fhandler.h (fhandler_base::close_fs): Reintroduce (as inline function)
for clearness.
	* fhandler_disk_file.cc (fhandler_base::fstat_fs): Revert previous
	change.
	(fhandler_base::open_fs): Ditto.
	* fhandler_socket.cc (fhandler_socket::close): Ditto.
2007-08-13 19:15:47 +00:00
Corinna Vinschen 176c3f21b4 * Makefile.in (DLL_OFILES): Remove delqueue.o.
* delqueue.cc: Delete.
	* fhandler.h (fhandler_base::close_fs): Drop declaration.
	(fhandler_disk_file::close): Drop declaration.
	* fhandler_disk_file.cc (fhandler_base::fstat_fs): Call close instead of
	close_fs.
	(fhandler_base::fstat_helper): Use open FH_UNIX handle in call to
	get_file_attribute.
	(fhandler_base::open_fs): Call close instead of get_file_attribute.
	(fhandler_disk_file::close): Remove.
	(fhandler_base::close_fs): Remove.
	* fhandler_socket.cc (fhandler_socket::close): Just call
	fhandler_base::close for FH_UNIX sockets.
	* shared.cc (user_shared_initialize): Drop call to
	user_shared->delqueue.init.
	* shared_info.h (CURR_USER_MAGIC): Change according to below change.
	(MAX_DELQUEUES_PENDING): Remove.
	(class delqueue_list): Remove.
	(class user_info): Remove delqueue.
	* syscalls.cc (close_all_files): Drop call to
	user_shared->delqueue.process_queue.
	(unlink): Drop delqueue handling.
2007-08-13 17:16:05 +00:00
Corinna Vinschen 19afaa1a50 * devices.in (dev_storage): Use native NT device name for kmsg mailslot.
* devices.cc: Regenerate.
	* fhandler.cc (fhandler_base::operator =): Use path_conv assignment
	operator.
	(fhandler_base::set_name): Ditto.
	(fhandler_base::open): Use NT native path in debug output.
	* fhandler_mailslot.cc: Convert to NT native function calls.
	* ntdll.h (struct _FILE_MAILSLOT_SET_INFORMATION): Define.
	(NtCreateMailslotFile): Declare.
	* path.cc (path_conv::set_normalized_path): Don't set wide_path to NULL.
	(path_conv::set_name): Remove unused function.
	* path.h (path_conv::set_name): Drop declaration.
	(path_conv::operator =): Define.
2007-08-13 15:08:25 +00:00
Christopher Faylor 8b6f3d4c86 * faq-programming.xml: Clarify where to run "make check". 2007-08-12 19:45:45 +00:00
Corinna Vinschen 87a7ae5e7f * fhandler.cc (fhandler_base::open): Remove HIDDEN_DOT_FILES code.
* fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto.
	* path.cc (symlink_worker): Ditto.
2007-08-12 15:42:02 +00:00
Corinna Vinschen 88d6787f07 * syscalls.cc (getw): Remove redundant implementation.
(putw): Ditto.
	(wcscmp): Ditto.
	(wcslen): Ditto.
	(memccpy): Ditto.
2007-08-12 15:20:16 +00:00
Corinna Vinschen 61c44b72d4 * ntdll.h: Add descriptive comments to special Rtl functions.
(STATUS_OBJECT_PATH_NOT_FOUND): Define.
	(STATUS_BUFFER_OVERFLOW): Define.
	(FILE_SUPERSEDED): Define.
	(FILE_OPENED): Define.
	(FILE_CREATED): Define.
	(FILE_OVERWRITTEN): Define.
	(FILE_EXISTS): Define.
	(FILE_DOES_NOT_EXIST): Define.
	(PIO_APC_ROUTINE): Typedef.
	(NtFsControlFile): Fix parameter types to use PIO_APC_ROUTINE.
	(NtWriteFile): Declare.
	(RtlInt64ToHexUnicodeString): Declare.
	* strfuncs.cc: Include ntdll.h.
	(RtlInt64ToHexUnicodeString): New function.
	* syscalls.cc (try_to_bin): Rewrite using native NT functions.
	Only try to create recycle bin after unsuccessfully trying to move
	file.  Also try to create special files in recycle bin so that Windows
	Explorer isn't unnecessarily stampeded.
2007-08-12 12:48:02 +00:00
Corinna Vinschen 5ede1e7109 * path.cc (fillout_mntent): Fix calculation of unicode buffer size. 2007-08-10 16:47:26 +00:00
Corinna Vinschen 349fba0cb4 * syscalls.cc (rename): Check oldpath and newpath for trailing dir
separators, require them to be existing directories if so.  Check
	for a request to change only the case of the filename.  Check paths
	for case insensitve equality only once.  Handle renaming a directory
	to another, existing directory by unlinking the destination directory
	first.  If newpath points to an existing file with R/O attribute set,
	try to unset R/O attribute first.  Augment hardlink test by not
	checking directories.  If renaming fails with STATUS_ACCESS_DENIED,
	try to unlink existing destination filename and try renaming again.
	Drop useless test for non-empty directory.  Always close fh at the
	end of the function.
2007-08-10 11:16:27 +00:00
Christopher Faylor a680a53258 * gendef (sigbe): Reset "incyg" while the stack lock is active to avoid a
potential race.
2007-08-09 17:20:09 +00:00
Corinna Vinschen 7d5f6c1887 * syscalls.cc (rename): Close oldpath file handle immediately after
trying to rename it.  Use nfh handle when checking for non-empty
	newpath directory.  Only change status if check_dir_not_empty really
	returns STATUS_DIRECTORY_NOT_EMPTY.
2007-08-09 10:32:25 +00:00
Chris Sutcliffe 14e7bcfdc4 2007-03-25 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/_mingw.h: Increment version to 3.13.
        * Makefile.in: Reset CYGRELEASE to 1
2007-08-03 22:51:23 +00:00
Chris Sutcliffe ed02170672 2007-03-25 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/_mingw.h: Increment version to 3.13.
2007-08-03 22:36:59 +00:00
Chris Sutcliffe 38c8dd544f 2007-08-03 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/w32api.h: Increment version to 3.10.
        * Makefile.in: Ditto.
2007-08-03 22:22:31 +00:00
Dave Korn 64b94981dc * Makefile.in (cygcheck.exe): Add bloda.o as prerequisite, adjusting
dependency-filtering $(wordlist ...) call appropriately.  Link ntdll.
	(bloda.o):  New rule to build bloda.o
	* cygcheck.cc (dump_sysinfo):  Call bloda function dump_dodgy_apps().
	* bloda.cc:  New file implements detection of applications from the
	Big List Of Dodgy Apps.
2007-08-03 19:41:48 +00:00
Corinna Vinschen e809fec984 * fhandler_disk_file.cc (readdir_get_ino): Accommodate native symlinks.
* syscalls.cc (rename): Ditto.
2007-08-02 15:13:56 +00:00
Corinna Vinschen 64a62f4cfe * smallprint.c: Remove. 2007-08-02 14:38:21 +00:00
Christopher Faylor 28575333c6 * lib/Makefile: Add missed file to accommodate below changes. 2007-08-02 14:34:46 +00:00
Christopher Faylor 20173edc98 Add missing checkin. 2007-08-02 14:33:32 +00:00
Christopher Faylor ba5f4d5087 * lib/cygwin_attach_dll.c: Fix compiler warning.
* lib/cygwin_crt0.c: Ditto.
2007-08-02 14:30:17 +00:00
Christopher Faylor de16566998 * Makefile.in: Add -lntdll to link line.
(CYGWIN_OBJS): Include strfuncs.o.
2007-08-02 14:23:22 +00:00
Christopher Faylor 7e4f1942e4 * dcrt0.cc (codepage_type): Remove definition.
* strfuncs.cc: Move it here.  New file with bits of miscfuncs.cc.
* miscfuncs.cc: Remove wide character stuff.
2007-08-02 14:21:53 +00:00
Corinna Vinschen dcd1ef4516 * smallprint.c: New file.
* Makefile.in (OBJS): Add smallprint.o.
	(CYGWIN_OBJS): Remove smallprint.o from Cygwin dir.
2007-08-02 14:07:19 +00:00
Corinna Vinschen e84b3704c4 * syscalls.cc (rename): Move and add text to comment about testing
oldpath and newpath referring to the same file.  Test if oldpath
	has more than one hardlink before opening oldpath (idea by Eric Blake).
	Reorder test so that file id is tested before volume serial number.
2007-08-02 11:11:34 +00:00
Corinna Vinschen 98144884f8 * path.h (struct fs_info): Drop root_len and name_hash members.
(fsinfo::length): Remove.
	(path_conv::rootdir): Remove.
	* syscalls.cc (try_to_bin): Use rootdir function instead of
	path_conv::rootdir method.
2007-08-02 10:33:28 +00:00
Corinna Vinschen b6c2b7cc73 * fhandler_disk_file.cc (path_conv::ndisk_links): Fix typo in call to
NtClose.
2007-08-02 10:22:30 +00:00
Corinna Vinschen f86258b5c1 * include/winbase.h (ReOpenFile): Add prototype.
* lib/kernel32.def (ReOpenFile@16): Add export.
2007-08-02 07:22:46 +00:00
Corinna Vinschen ae08b378c9 * syscalls.cc (rename): Check if oldpath and newpath refer to the
same file.  If so, return successfully and perform no other action,
	as per SUSv3.
2007-08-01 21:02:24 +00:00
Corinna Vinschen 8884a1682a * ntdll.h (STATUS_ACCESS_DENIED): Define.
* syscalls.cc (check_dir_not_empty): New static function.
	(unlink_nt): Move code checking for non-empty dir to check_dir_not_empty
	and call check_dir_not_empty instead.
	(rename): Add fault handler.  Check oldpath and newpath for trailing
	. and .. path components and return EINVAL if so.  Check oldpath
	for being on a vrtual file system.  If renaming a dir fails with
	STATUS_ACCESS_DENIED, check if the target dir is non-empty and return
	ENOTEMPTY if so.
2007-08-01 14:46:09 +00:00
Corinna Vinschen e9ff75192a * localtime.cc (tzsetwall): Don't set TZ. 2007-08-01 13:26:56 +00:00
Corinna Vinschen d3dd7d3682 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Drop
usage of path_conv::volser().
	(fhandler_base::fstat_by_name): Ditto.
	* ntdll.h (STATUS_NO_MEDIA_IN_DEVICE): Define.
	(STATUS_OBJECT_NAME_NOT_FOUND): Define.
	(FILE_REMOVABLE_MEDIA, FILE_READ_ONLY_DEVICE, FILE_FLOPPY_DISKETTE)
	(FILE_WRITE_ONCE_MEDIA, FILE_REMOTE_DEVICE, FILE_DEVICE_IS_MOUNTED)
	(FILE_VIRTUAL_VOLUME, FILE_AUTOGENERATED_DEVICE_NAME)
	FILE_DEVICE_SECURE_OPEN): Define Device Characteristics.
	(struct _FILE_FS_DEVICE_INFORMATION): Define.
	* path.cc (MAX_FS_INFO_CNT): Remove.
	(fsinfo): Remove.
	(fsinfo_cnt): Remove.
	(fs_info::update): Rewrite using native NT functions.  Drop fs_info
	cashing since it's incorrect.
	(path_conv::fillin): Use NtQueryInformationFile.  Drop setting serial
	number.
	(path_conv::check): Accommodate new fs_info::update parameters.
	(fillout_mntent): Ditto.
	* path.h (fs_info): Drop serial, has_ea and drive_type status
	flags.
	(fs_info::update): Declare with new parameters.
	(path_conf::drive_type): Remove.
	(path_conf::fs_has_ea): Remove.
	(path_conf::volser): Remove.
2007-08-01 12:55:25 +00:00
Corinna Vinschen 67629eb258 * fhandler.cc (check_posix_perms): Remove.
(fhandler_base::fpathconf): Return value of pc.has_acls () instead
	of calling check_posix_perms.
2007-08-01 08:36:38 +00:00
Corinna Vinschen 2bee37bcae * syscalls.cc (rename): Use unchanged path_conv in condition. 2007-08-01 07:52:35 +00:00
Corinna Vinschen 44587e392d * smallprint.cc (__small_vsprintf): Add format specifier 'W' for
PWCHAR arguments.  Move wide char handling after char handling.
2007-08-01 07:39:21 +00:00
Corinna Vinschen 8b5fa210a6 * ntdll.h (RtlFreeAnsiString): Declare.
* ntdll.h (RtlFreeOemString): Declare.
	* ntdll.h (RtlUnicodeStringToAnsiString): Declare.
	* ntdll.h (RtlUnicodeStringToOemString): Declare.
	* smallprint.cc: Renamed from smallprint.c.  Drop unnecessary
	forward declarations.
	(__small_vsprintf): Add format specifiers 'C' for WCHAR arguments
	and 'S' for PUNICODE_STRING arguments.
2007-07-31 20:48:17 +00:00
Chris Sutcliffe 5e51ebbfc6 2007-07-31 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/wtsapi32.h (WTS_CURRENT_SESSION, WTSDisconnectSession): Define.
2007-07-31 17:55:40 +00:00
Corinna Vinschen 9235f3ead1 * fhandler_disk_file.cc (fhandler_disk_file::link): Revert to checking
for binary in case of .exe files.
	* ntdll.h (RtlPrefixUnicodeString): Declare.
	* path.cc (path_conv::is_binary): New method.
	* path.h (path_conv::is_binary): Declare.
	* syscalls.cc (rename_append_suffix): New static helper function for
	rename.
	(rename): Rewrite.  New suffix tests.  Use native NT functions.
2007-07-31 15:20:00 +00:00
Corinna Vinschen 378692ee42 * fhandler_disk_file.cc (fhandler_disk_file::facl): If file can't be
opened for reading the ACLs, fall back to faking them.
	* sec_acl.cc (acl_worker): Handle non-existing files.
	* security.cc (get_file_attribute): Return ILLEGAL_UID/ILLEGAL_GID
	as owner/group for non-readable ACLs on file systems supporting them.
2007-07-30 10:58:16 +00:00
Corinna Vinschen 73151c54d5 * syscalls.cc (stat_worker): Don't call build_fh_pc with invalid pc. 2007-07-30 10:05:27 +00:00
Danny Smith bcf7308f02 2007-7-30 Martijn Wargers <martijnw22@users.sourceforge.net>
* include/wingdi.h (GetTextExtentExPointI): Add prototype.
	* lib/gdi32.def (GetTextExtentExPointI@28): Add export.
2007-07-30 01:02:31 +00:00
Christopher Faylor 5990b3399c * fhandler.cc (fhandler_base::wait_overlapped): Handle read EOF better and
issue a SIGPIPE when we get ERROR_NO_DATA.
2007-07-29 17:24:54 +00:00
Corinna Vinschen 9d017bd09c * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Don't allow
FileAttributes set to 0 when calling NtSetInformationFile since it has
	a special meaning.
	(fhandler_disk_file::facl): Ditto.
	(fhandler_disk_file::link): Only set attributes after copying files.
	Use SetFileAttributesW.
	* syscalls.cc (unlink_nt): Only care for actual FILE_ATTRIBUTE_READONLY.
	Don't allow FileAttributes set to 0 when calling NtSetInformationFile.
	After marking for deletion, restore R/O attribute on files to
	accommodate hardlinks.
2007-07-29 15:57:41 +00:00
Corinna Vinschen ed7ec849f6 * fhandler_disk_file.cc (fhandler_disk_file::link): Use FILE_ANY_ACCESS.
(fhandler_base::utimes_fs): Fix white space.
	(fhandler_disk_file::lock): Remove 9x blurb from comment.
	(fhandler_disk_file::mkdir): Use NtCreateFile/NtClose instead of
	CreateDirectoryA.
	(fhandler_disk_file::rmdir): Accommodate changes to unlink_nt.
	Simplify post-delete SMB-related tests.  Use NtQueryAttributesFile
	instead of GetFileAttributes.
	* ntdll.h (STATUS_DIRECTORY_NOT_EMPTY): Define.
	(NtQueryAttributesFile): Declare.
	* syscalls.cc (unlink_nt): Return NTSTATUS.  Drop setattrs parameter.
	Never use FILE_DELETE_ON_CLOSE, always use
	NtSetInformationFile(FileDispositionInformation) instead.
	Check for R/O attributes and open file with FILE_WRITE_ATTRIBUTES
	access if any of them are set.  Remove R/O attributes before
	marking for delete if necessary.  Revert them afterwards if necessary.
	(unlink): Accommodate changes to unlink_nt.
2007-07-29 12:27:22 +00:00
Corinna Vinschen 4368984a7b * fhandler_disk_file.cc: Use get_handle throughout.
(fhandler_disk_file::fchmod): Always try to open file with required
	access rights.  Use NtSetInformationFile instead of SetFileAttributes.
	(fhandler_disk_file::facl): Use NtSetInformationFile instead of
	SetFileAttributes.
	(fhandler_base::utimes_fs): Change lastaccess and lastwrite to
	LARGE_INTEGER.  Drop 9x directory case.  Use NtSetInformationFile
	instead of SetFileAttributes.  Drop temporarily changing R/O attribute
	since NtSetInformationFile(FileBasicInformation) also works on R/O
	files.
	* ntdll.h (STATUS_NOT_SUPPORTED): Define.
2007-07-29 08:23:04 +00:00
Christopher Faylor ee2984326b * cygtls.h (_cygtls::inside_kernel): Move function declaration into _cygtls
class.
* exceptions.cc (_cygtls::inside_kernel): Move function definition into _cygtls
class.
* fhandler.cc (fhandler_base::wait_overlapped): Make return tri-state to detect
when there is a EINTR situation.  Add a pointer to a length parameter.  Move
GetOverlappedResult into this function.
(fhandler_base::read_overlapped): Accommodate above changes and loop if we
receive a restartable signal.
(fhandler_base::write_overlapped): Ditto.
* fhandler.h (fhandler_base::wait_overlapped): Reflect above changes.
* fhandler_fifo.cc (fhandler_fifo::wait): Ditto.
2007-07-29 05:22:05 +00:00
Corinna Vinschen 81e98baf81 * ntdll.h (RtlEqualUnicodePathPrefix): Rename from RtlEqualPathPrefix.
(RtlEqualUnicodePathSuffix): Rename from RtlEqualPathSuffix.
	* fhandler_disk_file.cc (fhandler_disk_file::link): Accommodate above
	change.
2007-07-28 16:08:45 +00:00
Corinna Vinschen 74c5e8c73a * ntdll.h (RtlInitCountedUnicodeString): Swap order of string and length
parameters to be the same as for RtlInitEmptyUnicodeString.
	(RtlEqualPathPrefix): New inline function.
	(RtlEqualPathSuffix): New inline function.
	* fhandler_disk_file.cc: Accommodate parameter order change of
	RtlInitEmptyUnicodeString throughout.
	(fhandler_disk_file::link): Do path checking in unicode.  Call
	CopyFileW instead of CopyFileA.
2007-07-28 16:00:35 +00:00
Corinna Vinschen 745c29fe7b * autoload.cc (CreateHardLinkA): Remove.
* fhandler_disk_file.cc (fhandler_disk_file::link): Drop GetBinaryType
	test.  Just check exe suffix instead.  Tune creating new file name.
	Implement creating hard link using native NT functions which works
	on all platforms.
	* ntdll.h (STATUS_INVALID_DEVICE_REQUEST): Define.
	(struct _FILE_LINK_INFORMATION): Define.
2007-07-27 16:24:07 +00:00
Corinna Vinschen f590b14dfd * fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Use
NtQueryInformationFile instead of GetFileSize, NtFsControlFile instead
	of DeviceIoControl.
2007-07-27 13:19:41 +00:00
Corinna Vinschen ceaf31f416 * fhandler_disk_file.cc (fhandler_base::fstat_by_name): Use
RtlSplitUnicodePath.
	(fhandler_disk_file::fstat): Rename oret to opened.  Open file using NT
	functions right here.  Try to open parent dir instead of root directory
	to avoid call to rootdir.  Use NtFsControlFile.
	* ntdll.h (RtlSplitUnicodePath): Define.
2007-07-27 10:10:57 +00:00
Corinna Vinschen 655639ba89 * fhandler_disk_file.cc (is_volume_mountpoint): New static inline
function.
	(path_conv::ndisk_links): Call is_volume_mountpoint.
	(fhandler_disk_file::readdir_helper): Ditto.
2007-07-27 09:00:12 +00:00
Corinna Vinschen fe7bbe1504 * fhandler.h (enum query_state): Drop redundant query_stat_control.
* fhandler.cc (fhandler_base::open): Ditto.  Add READ_CONTROL to
	access and FILE_OPEN_FOR_BACKUP_INTENT to create_options when opening
	for writing.  Always set security attributes to avoid calling
	has_acls.
	* fhandler_disk_file.cc (fhandler_base::fstat_fs): Don't try to
	open file twice.
2007-07-27 08:38:00 +00:00
Corinna Vinschen 214c3a1167 * dir.cc (readdir_worker): Drop dir parameter from call to
readdir_get_ino.
	* fhandler.h (fhandler_disk_file::readdir_helper): Switch file name
	parameter to PUNICODE_STRING.
	* fhandler_disk_file.cc: Drop including ntdef.h.
	(class __DIR_mounts): Store mount points in UNICODE.  Additionally
	store cygdrive prefix in unicode here.  Change methods accordingly.
	(__DIR_mounts::eval_ino): Call new stat_worker instead of lstat64.
	(__DIR_mounts::~__DIR_mounts): New destructor to free UNICODE buffers.
	(path_conv::ndisk_links): Rewrite using native NT functions.
	(fhandler_base::fstat_by_handle): Use NAME_MAX instead of CYG_MAX_PATH.
	Always set pfvi->VolumeSerialNumber to non-0.  Remove last resort
	code.
	(fhandler_base::fstat_by_name): Rewrite using native NT functions.
	(fhandler_base::fstat_fs): Always call fstat_by_name if fstat_by_handle
	fails.
	(fhandler_base::fstat_helper): Rely on dwVolumeSerialNumber.
	(fhandler_disk_file::facl): Call fstat_by_name if fstat_by_handle fails.
	(DIR_BUF_SIZE): Define using NAME_MAX instead of CYG_MAX_PATH.
	(__DIR_cache): Remove __name.
	(d_dirname): Remove.
	(fhandler_disk_file::opendir): Drop pathname length check.
	Remove outdated comment.  Use get_name method instead of accessing
	pc.normalized_path directly.
	(readdir_get_ino): Drop unused dir parameter.  Accomodate throughout.
	Allocate fname dynamically.  Call new stat_worker instead of lstat64.
	Call NtOpenFile instead of CreateFile.  Call NtClose instead of
	CloseHandle.
	(fhandler_disk_file::readdir_helper): Use native NT functions.
	Check for volume mount points and use correct inode number.
	(fhandler_disk_file::readdir): Simplify slightly.
	Use get_name instead of pc.normalized_path.
	(fhandler_disk_file::rewinddir): Use RtlInitUnicodeString.
	(fhandler_cygdrive::fstat): Ignore floppy drives.  Set st_nlink
	correctly.
	(fhandler_cygdrive::readdir): Ignore floppy drives.
	* fhandler_netdrive.cc (fhandler_netdrive::readdir): Accommodate
	change to readdir_get_ino.
	* fhandler_proc.cc (PROC_DIR_COUNT): Define.
	(fhandler_proc::fstat): Evaluate correct link count for /proc.
	* ntdll.h (struct _FILE_DIRECTORY_INFORMATION): Define.
	(NtFsControlFile): Declare.
	(RtlAppendUnicodeToString): Declare.
	(RtlAppendUnicodeStringToString): Declare.
	(RtlCompareUnicodeString): Declare.
	(RtlCopyUnicodeString): Declare.
	(RtlCreateUnicodeStringFromAsciiz): Declare.
	(RtlEqualUnicodeString): Declare.
	(RtlFreeUnicodeString): Declare.
	(RtlInitEmptyUnicodeString): Declare.
	(RtlSecondsSince1970ToTime): Declare.
	(RtlInitEmptyUnicodeString): Define as inline function.
	(RtlInitCountedUnicodeString): Define as inline function.
	* path.cc (path_conv::check): New method with PUNICODE_STRING as path,
	preliminary implementation.
	(mount_info::get_mounts_here): Change to create UNICODE_STRINGs.
	Also copy cygpath prefix into UNICODE_STRING.
	(is_floppy): Drop 9x consideration.
	* path.h: Drop including ntdef.h.
	(path_conv::check): Add declaration.
	(path_conv::path_conv): Add constructor for UNICODE_STRING paths.
	* shared_info.h (mount_info::get_mounts_here): Change declaration.
	* syscalls.cc: Drop forward declaration of stat_worker.
	(stat_worke): Take path_conv as parameter.  Drop nofollow flag.
	(stat64): Create matching path_conv and call stat_worker with it.
	(lstat64): Ditto.
	* winsup.h: Include ntdef.h.
	(stat_worker): Declare.
	(readdir_get_ino): Change declaration.
2007-07-26 17:30:54 +00:00
Corinna Vinschen 4b62a570de * autoload.cc (CreateToolhelp32Snapshot): Remove. 2007-07-25 16:11:03 +00:00
Corinna Vinschen 38a67d337d * autoload.cc (Process32First): Remove.
(Process32Next): Remove.
2007-07-25 16:07:41 +00:00
Danny Smith 0cb2de3de0 * include/wtypes.h (LPDECIMAL): Define.
(DECIMAL_NEG, DECIMAL_SETZERO): Move definitions.
2007-07-25 10:21:53 +00:00
Corinna Vinschen fdcfcea4fc * autoload.cc (NetWkstaUserGetInfo): Remove.
(CharToOemBuffA): Remove.
	(KillTimer): Remove.
	(OemToCharBuffA): Remove.
	(SetTimer): Remove.
2007-07-25 10:04:57 +00:00
Corinna Vinschen 4db1416f76 Add missing ChangeLog entry. 2007-07-24 19:17:05 +00:00
Corinna Vinschen dd67e69634 * dumper.cc: Change license to plain GPLv2 + later.
* dumper.h: Ditto.
	* parse_pe.cc: Ditto.
2007-07-24 19:08:23 +00:00
Keith Marshall 452525aec7 * Makefile.in (SUBDIRS): Delete stray line continuation artifact,
resulting from incomplete removal of enclosing `for ...; do ...; done'
loop from compound command; (reported by Greg Chicares).
2007-07-23 21:32:35 +00:00
Christopher Faylor 82f123e5c6 * strace.cc (create_child): Don't convert a path from cygwin format unless it
has a slash.
2007-07-23 21:03:59 +00:00
Corinna Vinschen 238291e14f * bsd_helper.cc: Drop unnecessary security.h include. 2007-07-21 07:43:24 +00:00
Corinna Vinschen 0bfdd78fa9 Fix ChangeLog 2007-07-20 15:42:09 +00:00
Corinna Vinschen eea4e48208 * fhandler.cc (fhandler_base::fhaccess): Accommodate interface changes
of access control functions throughout.
	* fhandler_disk_file.cc: Ditto.
	* fhandler_registry.cc: Ditto.
	* sec_acl.cc: Drop unnecessary includes.
	(setacl): Take path_conv instead of file name as parameter.
	Accommodate interface changes of access control functions.
	(getacl): Ditto.
	* sec_auth.cc: New file, taking over all authentication related
	functions from security.cc.
	* sec_helper.cc: Drop unnecessary includes.
	* security.cc: Ditto.  Move all authentication related functions to
	sec_auth.cc.
	(ALL_SECURITY_INFORMATION): New define.  Use throughout.
	(set_file_sd): New function, replacing read_sd and the file related
	part of get_nt_object_security.
	(get_reg_sd): Rename from get_reg_security.  Drop type parameter.
	(get_reg_attribute): New function, replacing the registry related part
	of get_nt_object_security.
	(get_file_attribute): Take path_conv instead of file name as parameter.
	Use new get_file_sd call.
	(set_file_attribute): Ditto plus new set_file_sd.  Drop unnecessary
	implementation without uid/gid parameters.
	(check_file_access): Take path_conv instead of file name as parameter.
	Use new get_file_sd call.
	(check_registry_access): Use new get_reg_sd call.
	* security.h: Accommodate above interface changes.
2007-07-20 14:29:43 +00:00
Corinna Vinschen f36b37ed6e * security.cc (set_nt_attribute): Remove.
(set_file_attribute): Do it yourself instead of calling
	set_nt_attribute.
2007-07-19 17:42:11 +00:00
Corinna Vinschen e25b3402ac * fhandler_disk_file.cc (fhandler_base::fstat_by_name): Use
NtQueryFullAttributesFile instead of FindFirstFile.
	(fhandler_base::fstat_fs): Drop check for exec_state.  Drop check for
	invalid characters.
	* ntdll.h (struct _FILE_NETWORK_OPEN_INFORMATION): Define.
	(NtQueryFullAttributesFile): Declare.
2007-07-19 17:22:34 +00:00
Corinna Vinschen 91d2f6eebf * fhandler.cc (fhandler_base::open): Drop local wpath and upath
variables.  Call pc.get_object_attr to create object attributes.
	* fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto.
	* syscalls.cc (unlink_nt): Ditto.
	* path.cc (path_conv::set_normalized_path): Set wide_path to NULL.
	(path_conv::get_nt_native_path): Drop parameter.  Create path in
	wide_path/uni_path members.
	(path_conv::get_object_attr): New method to create object attributes.
	(path_conv::get_wide_win32_path): New method to create Win32 wide path.
	(path_conv::check): Initialize wide_path to NULL.
	(path_conv::~path_conv): cfree wide_path.
	* path.h (class path_conv): New members wide_path and uni_path.
	Add declarations of get_object_attr and get_wide_win32_path.
	(path_conv::path_conv): Initialize wide_path to NULL.
	(path_conv::get_nt_native_path): Drop parameter.
2007-07-19 11:41:17 +00:00
Danny Smith b0ff8192ad * include/fcntl.h (_O_WTEXT, _O_U16TEXT, _O_U8TEXT) Define for
Vista.
2007-07-19 09:25:32 +00:00
Corinna Vinschen 892635fd9f * sec_helper.cc: Remove unused code. 2007-07-19 09:12:09 +00:00
Corinna Vinschen 63a87c815a * autoload.cc (SetSecurityDescriptorControl): Drop.
* security.cc (alloc_sd): Set security descriptor control flag without
	calling SetSecurityDescriptorControl function.
	* wincap.h (wincapc::has_dacl_protect): Rename from
	has_security_descriptor_control.
	* wincap.cc: Ditto throughout.
2007-07-19 09:06:54 +00:00
Corinna Vinschen 5f9c8e2a87 * autoload.cc (SetUserObjectSecurity): Drop.
* pinfo.cc (pinfo::set_acl): Use NtSetSecurityObject instead of
	SetKernelObjectSecurity.
	* spawn.cc (spawn_guts): Use NtSetSecurityObject instead of
	SetUserObjectSecurity.
	* uinfo.cc (cygheap_user::init): Ditto.
2007-07-19 08:36:32 +00:00
Corinna Vinschen cce28460fe * cygheap.h (init_cygheap::luid): Remove.
* mmap.cc (mlock): Accommodate parameter change in call to
	push_thread_privilege.
	(munlock): Ditto.
	* ntdll.h (STATUS_NOT_ALL_ASSIGNED): Define.
	(NtAdjustPrivilegesToken): Declare.
	* sec_helper.cc (cygpriv): Reorder to match numerical privilege order.
	(privilege_luid): Take job of privilege_luid_by_name, using new
	cygpriv.
	(privilege_luid_by_name): Remove.
	(privilege_name): Accommodate new cygpriv array.
	(set_privilege): Call NtAdjustPrivilegesToken to avoid using advapi32.
	Accommodate changes to privilege_name.
	(set_cygwin_privileges): Simplify.  Don't try to set
	SE_CREATE_GLOBAL_PRIVILEGE on systems not supporting it.
	* security.cc (sys_privs): Reorder to match numerical privilege order.
	Use real privilege values as defined in security.h.
	(get_system_priv_list): Drop unused grp_list argument.  Create
	list of privileges according to new wincapc::max_sys_priv value.
	(get_priv_list): Call privilege_luid instead of privilege_luid_by_name.
	Make priv a local value instead of a pointer.
	(create_token): Accommodate parameter change in call to
	push_self_privilege.
	(lsaauth): Ditto.
	(check_access): Use privilege values directly instead of calling
	privilege_luid.
	* security.h: Define real privilege values.
	(cygpriv_idx): Remove.
	(privilege_luid): Change declaration.
	(privilege_luid_by_name): Drop declaration.
	(set_privilege): Change declaration.
	(set_process_privilege): Drop definition.
	(_push_thread_privilege): Accomodate new set_privilege parameters.
	* wincap.h (wincapc::max_sys_priv): New element.
	* wincap.cc: Implement above element throughout.
	(wincap_2000sp4): New wincaps structure.
	(wincap_xpsp1): Ditto.
	(wincap_xpsp2): Ditto.
	(wincapc::init): Use new wincaps.
	(wincapc::max_sys_priv): New element.
2007-07-19 08:33:22 +00:00
Corinna Vinschen 5fbf573cd3 * dcrt0.cc (dll_crt0_0): Call set_cygwin_privileges here, after
initializing hProcToken.
	* sec_helper.cc (init_global_security): Don't call set_cygwin_privileges        here.
2007-07-19 07:24:17 +00:00
Brian Dessent a1f175af95 * faq-using.xml (faq.using.console-window): Mention FHS location of
docs and remove outdated reference to ash.
2007-07-18 15:43:37 +00:00
Corinna Vinschen 9df1e6e860 * include/winnt.h (SE_TRUSTED_CREDMAN_ACCESS_NAME): Define. 2007-07-18 12:52:45 +00:00
Corinna Vinschen c5b1a133c0 * cygheap.h (shared_prefix): De-const.
(shared_prefix_buf): Add static buffer for shared prefix to avoid
	additional allocation.
	* cygheap.cc (cygheap_init): Set cygheap->shared_prefix to
	cygheap->shared_prefix_buf and strcpy.
2007-07-18 11:15:51 +00:00
Corinna Vinschen 52a6e6d8c7 * fhandler.cc (fhandler_base::fhaccess): Add check for R/O file system.
* security.cc (check_registry_access): Set errno to EROFS when checking
	for W_OK.
2007-07-17 14:39:02 +00:00
Corinna Vinschen a58a8938cc * include/winnt.h (FILE_READ_ONLY_VOLUME): Define.
* include/ddk/ntifs.h (FILE_READ_ONLY_VOLUME): Define.
2007-07-17 14:30:38 +00:00
Corinna Vinschen 822036b6c9 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Move setting
cfd->nohandle where it won't crash.
2007-07-17 13:22:21 +00:00
Corinna Vinschen 77ee880504 * cygheap.h (cygheap_user::curr_imp_token): Rename from current_token.
Accommodate changge throughout Cygwin.
	(cygheap_user::imp_token): Rename from token.  Accommodate changge
	throughout Cygwin.
	(rcygheap_user::eimpersonate): Use primary token for impersonation.
	* grp.cc (internal_getgroups): Use primary impersonation token when
	impersonated.
	* security.h (_push_thread_privilege): Use primary impersonation token
	when impersonated.
2007-07-16 20:01:15 +00:00
Christopher Faylor 6f76c68713 * init.cc (in_dllentry): Delete.
(dll_entry): Remove assignment to deleted variable.
* winsup.h (in_dllentry): Delete declaration.
* exceptions.cc (inside_kernel): Use another method to see if we are in
dll_entry phase.
2007-07-14 15:58:32 +00:00
Christopher Faylor d409af3661 * init.cc (in_dllentry): Make NO_COPY to avoid spurious false positives. 2007-07-14 02:27:11 +00:00
Chris Sutcliffe 7e644d8aed 2007-07-12 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/winuser.h (FE_FONTSMOOTHINGSTANDARD, FE_FONTSMOOTHINGCLEARTYPE):
        Define.
2007-07-12 11:22:31 +00:00
Danny Smith 05694dc580 Changelog typo 2007-07-12 09:42:31 +00:00
Danny Smith f2a9580699 * incude/wchar.h (_wsystem) Declare.
(_wputenv) Declare.
	(_wgetenv): Declare.
	(_wsearchenv): Declare.
	(_wmakepath): Declare.
	(_wsplitpath): Declare.
	(_wfullpath): Declare.
	* incude/stdlib.h (_wsystem) Declare.
	(_wputenv, _wgetenv, _wsearchenv, _wmakepath, _wsplitpath, _wfullpath):
	Move into _WSTDLIB_DEFINED guard.
	* include/tchar.h (_tsystem): New UNICODE mapping define.
2007-07-12 09:38:17 +00:00
Danny Smith 0986f3e208 * include/winuser.h: (PBT_APMQUERYSUSPEND, PBT_APMQUERYSTANDBY,
PBT_APMQUERYSUSPENDFAILED, PBT_APMQUERYSTANDBYFAILED,
	PBT_APMSUSPEND, PBT_APMSTANDBY, PBT_APMRESUMECRITICAL,
	PBT_APMRESUMESUSPEND, PBT_APMRESUMESTANDBY, PBT_APMBATTERYLOW,
	PBT_APMPOWERSTATUSCHANGE, PBT_APMOEMEVENT, PBT_APMRESUMEAUTOMATIC):
	Sync with include/pbt.h.
2007-07-12 07:54:51 +00:00
Danny Smith 95d4361935 [mingw-Bugs-1751518]
* include/mshtml.h (IHTMLDocument2): Correct spelling of put_URL, get_URL.

	[mingw-Bugs-1751565]
	* include/basetyps.h (IID); Guard with __IID_DEFINED__

	[mingw-Bugs-1751595]
	* include/exdisp.h (DWebBrowserEvents2): Remove undocumented STDDISP
	methods.
2007-07-12 05:49:18 +00:00
Danny Smith 7223b8cd03 [mingw-Bugs-1750898]
* include/mmsystem.h (MIXERCONTROL): Correct UNICODE mapping.
	Thanks to Yuji Kuwabara  <yujikuwabara at sf dot net>
2007-07-10 08:06:00 +00:00
Christopher Faylor be1cabba23 * debug.cc (close_handle): Change debug output format slightly.
* dlfcn.cc (dlclose): Don't close handle returned from GetModuleHandle(NULL).
* fhandler.h (fhandler_pipe::create): Remove obsolete argument.
(fhandler_pipe::create): Ditto.
* fhandler.cc (fhandler_pipe::create): Ditto.
(fhandler_pipe::create): Ditto.
2007-07-10 01:21:03 +00:00
Christopher Faylor 99b0856099 * strace.cc (usage): Add missing description for -q. 2007-07-10 00:57:30 +00:00
Christopher Faylor 5c8891e962 * cygwin/strsig.cc (__signals): New macro.
(sys_sigabbrev): New array of signal strings, patterned after linux.
(siglist): Use __signals.
* cygwin/include/cygwin/signal.h (sys_sigabbrev): Define.
* cygwin/include/cygwin/version.h: Bump API minor version to 177.

* utils/Makefile.in (kill.exe): Remove reliance on libiberty.
* utils/kill.cc (strsigno): New function patterned after libiberty but using
newly exported cygwin array.
2007-07-10 00:12:54 +00:00
Corinna Vinschen 281bd334ac * dir.cc (closedir): Revert change from 2007-06-29.
* fhandler.h (dirent_valid_fd): Drop.
	* fhandler_disk_file.cc (fhandler_disk_file::opendir): If opening a
	real dir, use the underlying fhandler to keep track of the directory
	handle.  In fdopendir case use original io_handle from fhandler.  Use
	fhandler's io_handle in subsequent directory functions throughout.
	Create handle non-inheritable and set close-on-exec flag.
	(readdir_get_ino): Drop dirent_isroot case.
	(fhandler_disk_file::readdir): Handle dirent_isroot case here.
	(fhandler_disk_file::rewinddir): Revert change from 2007-07-05.  Use
	NtClose instead of CloseHandle.
	* fhandler_virtual.cc (fhandler_virtual::opendir): Drop adding
	dirent_valid_fd flag.  Set close-on-exec flag.
2007-07-09 17:02:37 +00:00
Danny Smith 8d2008a317 [mingw-Bugs-1749305]
* lib/kernel32.def (GetConsoleProcessList@8):  Add export.
2007-07-09 08:56:22 +00:00
Christopher Faylor b85bae86cd * Makefile.in (DLL_OFILES): Add newly-imported random.o. Eliminate reliance on
libiberty.
* random.cc: Import from FreeBSD.  Modify for Cygwin environment.
* include/cygwin/stdlib.h (random): Reflect change in return value to be more
linux/freebsd-like.
(srandom): Ditto.
2007-07-08 15:04:34 +00:00
Christopher Faylor f3c7a5c457 Add initial FreeBSD version of random.c 2007-07-08 14:59:47 +00:00
Christopher Faylor e19e357043 update copyright 2007-07-07 17:29:20 +00:00
Christopher Faylor 92eab16eed * fhandler.h (fhandler_base::write): Remove __stdcall decoration.
(fhandler_pipe::write): Ditto.
(fhandler_fifo::write): Ditto.
2007-07-07 17:28:22 +00:00
Christopher Faylor d9c0e3ec35 Preliminary change to make fifos/pipes interruptible and fifos reliable.
* dtable.cc (dtable::find_fifo): Eliminate definition.
* dtable.h (dtable::find_fifo): Ditto for declaration.
* fhandler.cc (fhandler_base::raw_read): Remove pipe-specific stuff.
(fhandler_base::fhandler_base): Ditto.
(fhandler_base::close): Handle overlapped I/O structure if appropriate.
(fhandler_base::dup): Ditto.
(fhandler_base::fork_fixup): Ditto.
(fhandler_base::setup_overlapped): Define new function.
(fhandler_base::destroy_overlapped): Ditto.
(fhandler_base::wait_overlapped): Ditto.
(fhandler_base::read_overlapped): Ditto.
(fhandler_base::write_overlapped): Ditto.
* fhandler.h (fhandler_base::get_overlapped): Declare new function.
(fhandler_base::setup_overlapped): Ditto.
(fhandler_base::destroy_overlapped): Ditto.
(fhandler_base::wait_overlapped): Ditto.
(fhandler_base::read_overlapped): Ditto.
(fhandler_base::write_overlapped): Ditto.
(fhandler_base::get_guard): Eliminate.
(fhandler_pipe::*): Rework to eliminate most Win9x related cruft, removing many
variables and defining a new overlapped capability.
(fhandler_fifo::*): Ditto.
(fifo_state): Declare new enum.
* fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Remove old Win9x stuff.
Initialize overlapped handle to NULL.
(fhandler_fifo::set_use): Eliminate.
(fhandler_fifo::open_nonserver): Define.
(fhandler_fifo::open): Rework to use named pipes and overlapped I/O.
(fhandler_fifo::wait): Define new function to wait for named pipe connection.
(fhandler_fifo::read): Rework to use wait() and new overlapped I/O
functionality.
(fhandler_fifo::write): Ditto.
(fhandler_fifo::dup): Eliminate.
* pinfo.cc (commune_process): Remove fifo handling.
(_pinfo::commune_request): Ditto.
* pinfo.h (picom): Ditto.
* pipe.cc (fhandler_pipe::fhandler_pipe): Remove Win9x stuff.  Initialize
overlapped handle to NULL.
(fhandler_pipe::open): Eliminate Win9x stuff.
(fhandler_pipe::set_close_on_exec): Eliminate.
(read_pipe): Eliminate.
(fhandler_pipe::close): Ditto.
(fhandler_pipe::fixup_after_exec): Ditto.
(fhandler_pipe::fixup_in_child): Ditto.
(fhandler_pipe::read): Rework to use overlapped I/O.
(fhandler_pipe::write): New function using overlapped I/O.
(fhandler_pipe::dup): Rework to eliminate Win9x stuff.
(fhandler_pipe::create_selectable): Rework to eliminate Win9x and use
overlapped I/O.
* select.cc (peek_pipe): Rework to eliminate Win9x stuff and use overlapped
I/O.
(fhandler_base::ready_for_read): Ditto.
2007-07-07 17:00:33 +00:00
Christopher Faylor dee5588839 * path.cc (symlink_info::check_shortcut): Handle device "symlinks" specially -
don't posixify them.
2007-07-07 16:48:26 +00:00
Christopher Faylor 8581e92c51 * fhandler_disk_file.cc: White space.
* fhandler_proc.cc: Ditto.
* fhandler_virtual.cc: Ditto.
2007-07-07 16:46:35 +00:00
Christopher Faylor 7b44665a7b * fork.cc: White space.
* net.cc: Ditto.
* posix_ipc.cc: Ditto.
2007-07-07 16:43:03 +00:00
Corinna Vinschen a5a0080d9c * times.cc (gettimeofday): Align definition to POSIX. 2007-07-06 20:09:23 +00:00
Corinna Vinschen d2d9ce09b5 * cygwin.din: Export wcstol, wcstoll, wcstoul, wcstoull, wcsxfrm.
* include/cygwin/version.h: Bump API minor number.
2007-07-06 20:05:44 +00:00
Corinna Vinschen 4cd2304ab6 * CYGWIN_LICENSE: Fix URL to world-wide offices. 2007-07-06 19:55:43 +00:00
Corinna Vinschen de3f4565aa * CYGWIN_LICENSE: Fix URL to open source definition. 2007-07-06 19:51:44 +00:00
Corinna Vinschen 64f50c2b3c * fhandler_disk_file.cc (fhandler_disk_file::opendir): Add missing
OBJ_INHERIT flag when creating OBJECT_ATTRIBUTES.
	(fhandler_disk_file::rewinddir): Ditto.
2007-07-05 09:35:36 +00:00
Corinna Vinschen 3854c5c0d5 Check in missing cygwin.din change from 2007-06-29. 2007-07-05 07:36:11 +00:00
Corinna Vinschen c467d17e7c * times.cc: Define __timezonefunc__ before including time.h to protect
definition of timezone function.
2007-07-04 10:43:29 +00:00
Corinna Vinschen 0d9cddc377 * include/cygwin/time.h: Switch to timezone variable by default. Add
comment.
2007-07-04 09:56:15 +00:00
Corinna Vinschen 5ee15d270d * include/shlobj.h: Add CSIDL_MYMUSIC and CSIDL_MYVIDEO. 2007-07-02 09:47:36 +00:00
Danny Smith 9cb64a070d * include/oaidl.h: Include windows.h and ole2.h,
unless COM_NO_WINDOWS_H.

	[ mingw-Bugs-1742130 ]
	* include/oaidl.h (struct tagVARIANT): Add union members
	LONGLONG  * pllVal and ULONGLONG * pullVal.
2007-07-02 02:52:56 +00:00
Danny Smith 2d28574cc2 * include/ws2tcpip.h (s6_addr32): Correct definition,
Thanks to Alfred E. Heggestad <aeh at db dot org>
2007-07-01 10:09:12 +00:00
Corinna Vinschen 40570a828e * cygwin.din: Export fdopendir.
* dir.cc (opendir): Call fhandler's opendir with fd set to -1.
	(fdopendir): New function.
	(seekdir64): Use dirent_info_mask.
	(rewinddir): Ditto.
	(closedir): Only release underlying file descriptor if it has been
	reserved by opendir itself.
	* fhandler.cc (fhandler_base::opendir): Accommodate new parameter.
	* fhandler.h (dirent_states): Add dirent_valid_fd and dirent_info_mask.
	(fhander_XXX::opendir): Add file descriptor parameter.  Use regparms.
	(fhandler_procnet::opendir): Drop declaration.
	* fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto.
	If called from fdopendir, use existing handle to re-open directory
	with valid flags.  Rename fd to cfd.  Use only if no valid incoming fd.
	(fhandler_cygdrive::opendir): Accommodate new parameter.
	* fhandler_process.cc (fhandler_process::opendir): Ditto.
	* fhandler_procnet.cc (fhandler_procnet::opendir): Drop definition.
	* fhandler_virtual.cc (fhandler_virtual::opendir): Accommodate new
	parameter.  Only create new file descriptor entry if called from
	opendir.  Remove duplicated setting of dir->__flags.
	* posix.sgml: Add fdopendir to list of implemented Solaris functions.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/dirent.h: Declare fdopendir.
2007-06-29 15:13:01 +00:00
Danny Smith b363c819dd * mingwex/gdtoa/mingw_snprintf.c: New file.
* mingwex/Makefile.in (GDTOA_DISTFILES): Add mingw_snprintf.c.
	(GDTOA_OBJS): Add mingw_snprintf.O.
2007-06-29 10:11:57 +00:00
Corinna Vinschen d802576ca1 * cygwin-api.in.sgml: Remove authorgroup and revhistory.
* cygwin-ug.in.sgml: Add Joshua Daniel Franklin to authorgroup.
	Remove revhistory.
	* legal.sgml: Update dates.
2007-06-29 07:36:54 +00:00
Brian Dessent 64fdc12ed5 * include/cygwin/version.h: Fix comment typo. 2007-06-28 22:45:49 +00:00
Corinna Vinschen 3e96da0b53 * cygwin.din: Export stpcpy, stpncpy.
* posix.sgml: Add stpcpy and stpncpy to list of implemented
	GNU extensions.
	* include/cygwin/version.h: Bump API minor number.
2007-06-28 17:55:01 +00:00
Danny Smith a4b5a24055 * msvcrt.def.in: Update comment.
Exclude _ctype stub if using msvcr71.dll or newer.
	* include/ctype.h: Don't declare _ctype if using msvcr71.dll or newer.
	* include/wctype.h: Likewise.
2007-06-28 07:13:04 +00:00
Corinna Vinschen 41391cb2bb * shared_info.h (SHARED_INFO_CB): Accommodate change to shared_info.
(CURR_SHARED_MAGIC): Ditto.
	(class shared_info): Add heap_slop_inited member.
	* shared.cc (shared_info::heap_slop_size): Use heap_slop_inited to
	track initializing heap_slop since 0 is a valid value for heap_slop.
	Drop useless < 0 consideration.
2007-06-27 17:08:19 +00:00
Eric Blake 048e00e01d * assert.cc (__assert_func): New function, to match newlib header
change.
	* cygwin.din: Export __assert_func.
	* include/cygwin/version.h: Bump API minor number.
2007-06-27 12:46:35 +00:00
Danny Smith 26e8e4beff *include/wctpe.h: Likewise.
*include/wdirent.h: Likewise.
Changelog: Whitespace
Further: http://www.lib.virginia.edu/cgi-bin/imgload.cgi/53
2007-06-23 07:54:58 +00:00
Danny Smith 25b4cace74 *include/assert.h: Qualify all functions with __MINGW_NOTHROW.
*include/conio.h:  Likewise.
	*include/ctype.h:  Likewise.
	*include/direct.h:  Likewise.
	*include/dos.h:  Likewise.
	*include/errno.h:  Likewise.
	*include/fenv.h:  Likewise.
	*include/float.h:  Likewise.
	*include/inttypes.h:  Likewise.
	*include/io.h:  Likewise.
	*include/libgen.h:  Likewise.
	*include/locale.h:  Likewise.
	*include/malloc.h:  Likewise.
	*include/mbctype.h:  Likewise.
	*include/mbstring.h:  Likewise.
	*include/process.h:  Likewise.
	*include/search.h:  Likewise.
	*include/setjmp.h:  Likewise.
	*include/signal.h:  Likewise.
	*include/stdio.h:  Likewise.
	*include/stdlib.h:  Likewise.
	*include/string.h:  Likewise.
	*include/time.h:  Likewise.
	*include/wchar.h:  Likewise.
	*include/sys/stat.h:  Likewise.
	*include/sys/time.h:  Likewise.
	*include/sys/timeb.h:  Likewise.
	*include/sys/utime.h:  Likewise.
2007-06-23 07:34:16 +00:00
Danny Smith 8820b5ec12 * mingwex/Makefile.in (LIB_OBJS): Revert accidental removal.
Good night all.
2007-06-22 10:22:49 +00:00
Danny Smith e54e4d47f1 Add POSIX binary tree search API.
* mingwex/tfind.c: New file.
	* mingwex/tdelete.c: New file.
	* mingwex/tsearch.c: New file.
	* mingwex/twalk.c: New file.
	* mingwex/Makefile.in (DISTFILES): Add tsearch.c twalk.c tdelete.c tfind.c.
	* mingwex/Makefile.in (POSIX_OBJS): Add tsearch.o twalk.o tdelete.o tfind.o.
	* include/search.h (tfind): Declare.
	(tdelete): Declare.
	(tsearch): Declare.
	(twalk): Declare.
	(ENTRY): Define.
	(ACTION): Define.
	(VISIT): Define.
	(node_t): Define, on condition of _SEARCH_PRIVATE.
2007-06-22 10:09:20 +00:00
Danny Smith 3d7e738f72 * include/_mingw.h (__MINGW_NOTHROW): Define. 2007-06-22 09:19:25 +00:00
Corinna Vinschen a71ecb55de * autoload.cc (WSAIoctl): Remove.
* cygwin.din: Export freeifaddrs, getifaddrs.
	* fhandler_socket.cc (fhandler_socket::ioctl): Drop SOCKET parameter
	from get_ifconf.
	* net.cc: Include ifaddrs.h.
	(in_are_prefix_equal): Match addresses in network byte order.
	(ip_addr_prefix): Convert address into host byte order before
	testing with IN_LOOPBACK.
	(struct ifall): Define.
	(get_xp_ifs): Replace get_xp_ifconf.  Return struct ifall array.
	(get_2k_ifs): Ditto, replace get_2k_ifconf.
	(get_nt_ifs): Ditto, replace get_nt_ifconf.
	(getifaddrs): New function.
	(freeifaddrs): New function.
	(get_ifconf): Call matching get_XX_ifs function and create
	ifc content from here.  Drop lo fake since it's now in get_nt_ifs.
	* posix.sgml: Add freeifaddrs and getifaddrs to list of implemented
	BSD functions.
	* wincap.h (wincapc::has_broken_if_oper_status): New element.
	* wincap.cc: Implement above element throughout.
	* include/ifaddrs.h: New file.
	* include/cygwin/version.h: Bump API minor number.
2007-06-21 15:57:54 +00:00
Corinna Vinschen d3c73d4999 * cygwin.din: Export exp10, exp10f, pow10, pow10f, strcasestr,
funopen, fopencookie.
	* include/cygwin/version.h: Bump API minor number.
	* posix.sgml: Minor improvements.
2007-06-21 07:22:16 +00:00
Corinna Vinschen 9cc40d5d16 * include/cygwin/if.h (IFF_POINTOPOINT): Fix typo. 2007-06-20 09:28:47 +00:00
Danny Smith bdcb3ba03c * include/stdio.h (vsnprintf): Remove inline definition.
Add prototype.
2007-06-18 09:50:01 +00:00
Danny Smith bae2120761 * CRTfmode.c: Nit-pick comment fix. 2007-06-17 02:12:47 +00:00
Christopher Faylor 4818869bda * CRTfmode.c: Fix nested comment. 2007-06-17 00:41:13 +00:00
Christopher Faylor e10b44c2a6 * include/string.h (strcasecmp): Fix typo in declaration prototype. 2007-06-17 00:37:00 +00:00
Christopher Faylor 4a2c88cdc7 * include/search.h: Reinstate node_t definition.
* include/sys/cdefs.h: Remove in favor of newlib version.
2007-06-17 00:31:27 +00:00
Corinna Vinschen 8e4a60b383 * autoload.cc (GetIpForwardTable): Define.
* fhandler_socket.cc (fhandler_socket::ioctl): Handle SIOCGIFDSTADDR.
	* net.cc (get_routedst): New static function to get destination
	address of point-to-point interfaces.
	(get_xp_ifconf): Handle SIOCGIFDSTADDR.
	(get_2k_ifconf): Ditto.
	(get_nt_ifconf): Ditto.
	(get_ifconf): Ditto.
	* include/asm/socket.h (SIOCGIFDSTADDR): Define.
	* include/cygwin/if.h (struct ifreq): Add ifru_dstaddr member.
	(ifr_dstaddr): Define.
	* include/cygwin/in.h: Cast ipv4 addresses correctly to in_addr_t in
	definitions.
2007-06-14 16:02:32 +00:00
Danny Smith adb97e6242 * include/io.h (lseek64) : Add prototype. 2007-06-14 03:05:08 +00:00
Danny Smith 9958ad7217 * include/string.h (strcasecmp): Add prototype.
(strncasecmp): Add prototype.
2007-06-14 03:01:33 +00:00
Danny Smith b338158ee6 * Makefile.in (CRT0S): Revert last change.
* CRTfmode.c. Correct comment.
2007-06-13 08:26:13 +00:00
Danny Smith d25e2751e4 * Makefile.in (CRT0S): Add back CRTfmode.o. 2007-06-13 07:50:18 +00:00
Danny Smith 5930885278 * include/stdlib.h: Don't include stdint.h. Conditionally define intptr_t.
* include/io.h: Likewise.
2007-06-13 07:43:58 +00:00
Christopher Faylor ecd5f070c8 * signal.cc (usleep): Use useconds_t for the type as per POSIX. 2007-06-12 20:49:48 +00:00
Corinna Vinschen ead5b131e0 * Makefile.in (DLL_OFILES): Add xsique.o.
* cygwin.din (confstr): Make NOSIGFE.
	(insque): Export.
	(remque): Export.
	* lsearch.cc: Remove superfluous _SEARCH_PRIVATE define.
	* posix.sgml: Move insque to defined SUSv3 interfaces.  Remove
	comment for remque.
	* include/search.h: Remove _SEARCH_PRIVATE guarded definitions.
	Add struct qelem definition.  Add insque and remque declarations.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/queue.h: Remove insque/remque definitions so as not
	to collide with SUSv3 compatible declaration in search.h.
	* libc/xsique.cc: New file implementing insque and remque.
2007-06-12 15:24:46 +00:00
Corinna Vinschen 5ef61dd044 * fhandler.cc (fhandler_base::fstat): Set pipe permission bits more
correctly.
2007-06-12 08:28:44 +00:00
Corinna Vinschen 1570432db3 * cygwin.din (confstr): Export.
* posix.sgml (confstr): Move to list of implemented SUSv3 functions.
	* sysconf.cc (confstr): Implement.
	* include/cygwin/version.h: Bump API minor number.
2007-06-11 17:38:27 +00:00
Danny Smith 657d7a4610 * crt1.c (__mingw_CRTStartup): Add explicit call to libgcc's __main. 2007-06-11 08:38:16 +00:00
Corinna Vinschen 7f6ee25a1a * cygwin-api.in.sgml: Accommodate new "Compatibility" section layout. 2007-06-05 10:11:55 +00:00
Corinna Vinschen 32a2c31a83 * ansi.sgml: Delete.
* misc-std.sgml: Delete.
	* posix.sgml: Rework entirely.
2007-06-05 10:10:16 +00:00
Christopher Faylor f0136ac908 * cygcheck.cc (pathlike): New class.
(paths): Redefine as type pathlike.
(display_error): Declare a few different ways to allow more flexible usage
throughout.
(display_error_fmt): New function for those cases where C++ just isn't enough.
(add_path): Rewrite to allocate pathlike paths.  Always tack on a trailing
slash since that's what everyone who uses it wants.  NULL terminate the path
list.  Register "it's a system path" field.
(init_path): Call add_path with info regarding whether path is a system path or
not.
(pathlike::check_existence): Move into pathlike class.  Accept file and
extension arguments to build up path on the fly.  Modify other arguments.
(find_on_path): Constify return value and appropriate arguments.  Eliminate
short-circuit for fully-qualified paths.  Simplify loop which iterates over
path.
(already_did): Constify argument.
(track_down): Ditto.  Regularize some error messages.
(find_app_on_path): Ditto.
(cygcheck): Constify argument.  Use 20th century string handling functions.
(dump_sysinfo): Remove odd inclusion of '\\bin' "Just in case".  Accommodate
change of paths to pathlike.
* path.cc (isslash): Rename from SLASH_P and use throughout.
(rel_vconcat): Front-end to vconcat which prepends cwd to path before passing
along for conversion to native windows.
(cygpath): Remove "./" test.  Call rel_vconcat if filename appears to be
relative.
2007-06-04 01:57:16 +00:00
Corinna Vinschen ad4e943fca * dtable.cc (dtable::set_file_pointers_for_exec): Call SetFilePointer
correctly for 64 bit file access.  Comment out functionality.
	* fhandler.cc (fhandler_base::open): Don't set append_mode.
	(fhandler_base::write): Check for O_APPEND instead of append_mode.
	Call SetFilePointer correctly for 64 bit file access.  Handle
	errors from SetFilePointer.
	* fhandler.h (class fhandler_base): Drop append_mode status flag.
	* fhandler_disk_file.cc (fhandler_base::fstat_helper): Handle
	seeking correctly for 64 bit file access.
2007-05-29 17:25:36 +00:00
Corinna Vinschen 8a11b13ff0 * dumper.cc (dumper::prepare_core_dump): Record a phdr for each section. 2007-05-29 08:08:06 +00:00
Corinna Vinschen df1841c310 * cygpath.cc (do_options): Allow outputflag combined with other
basic flags.  Only check options_from_file_flag if reading options
	from command line.
	(main): Check for NULL argz vector.  Don't free argz vector prematurely.
	Don't force flag combination in !options_from_file_flag case.
2007-05-29 07:54:45 +00:00
Chris Sutcliffe 443f9c5532 2007-05-23 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* lib/secur32.def (InitSecurityInterfaceA, InitSecurityInterfaceW): Define.

        Thanks to Jim Marshall (jim dot marshall at wbemsolutions dot com) for
        supplying the information.
2007-05-24 01:03:54 +00:00
Corinna Vinschen fc2000254c * cygpath.cc: Include argz.h.
(options_from_file_flag): Move from main to global static variable.
	(mode_flag): Ditto.
	(do_sysfolders): Rename from dowin and accommodate throughout.
	Don't exit from here.
	(do_pathconv): Rename from doit and accommodate throughout.
	(print_version): Change copyright.
	(do_options): New function, centralizing option processing.
	Rework checking options for correctness.
	(action): New function, centralizing calling worker functions.
	(main): Simplify.  Move option processing to do_options.  Move calling
	worker functions to action.  Rework getting arguments from files.
2007-05-23 16:45:03 +00:00
Corinna Vinschen 04396e79d2 * path.cc (cwdstuff::set): Revert useless acquire check. 2007-05-22 13:03:43 +00:00
Corinna Vinschen 542a6016e5 * path.cc (cwdstuff::set): Avoid double aquiring of cwd_lock.
Open directory with inheriting enabled.
2007-05-22 12:43:31 +00:00
Corinna Vinschen ba75e8c878 * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Don't invalidate
devbuf if new position is within buffered range.
2007-05-22 07:16:19 +00:00
Corinna Vinschen 8e563c2741 * include/search.h (hsearch_r): Provide declaration. 2007-05-21 13:34:12 +00:00
Corinna Vinschen b7a37e8d7c * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Set buf size to
sector size.  Simplify non-sector aligned case.  Handle errors from
	raw_read.
2007-05-21 09:11:27 +00:00
Chris Sutcliffe 2c656a51c9 2007-05-19 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/shellapi.h (NIN_POPUPOPEN, NIN_POPUPCLOSE): Define.
2007-05-19 23:52:44 +00:00
Corinna Vinschen f9a963b8a0 * fhandler_socket.cc (adjust_socket_file_mode): New inline function.
(fhandler_socket::fchmod): Squeeze mode through adjust_socket_file_mode
	before using it.
	(fhandler_socket::bind): Ditto.
2007-05-15 16:33:20 +00:00
Christopher Faylor 90c2ba7806 * path.cc (fs_info::update): Set and use is_cdrom.
* path.cc (fillout_mntent): Set ret.mnt_type to something more Linux-like,
based on data from fs_info.  Move "system" and "user" strings from mnt_type to
mnt_opts.
* path.h (struct fs_info): Add is_cdrom field.
* path.h (fs_info::clear): Initialize is_cdrom.
* path.h (struct fs_info): Add IMPLEMENT_STATUS_FLAG(bool,is_cdrom).
* path.h (class path_conv): Add fs_is_cdrom method.  Add missing fs_is_netapp
method.
2007-05-15 01:27:30 +00:00
Christopher Faylor 22ed94e503 * cygwin.din (asnprintf, dprint, _Exit, vasnprintf, vdprintf): Export.
* include/cygwin/version.h: Bump API minor number.
2007-05-15 01:23:30 +00:00
Danny Smith 22af2ce141 * include/stdint.h (intptr_t): Fix typo.
Thanks to Charles Wilson for report.
2007-05-08 03:19:28 +00:00
Danny Smith 993e75f677 * include/stdint.h (intptr_t): Protect with _INTPTR_T_DEFINED.
Condition on _WIN64.
	(uintptr_t): Protect with _UINTPTR_T_DEFINED.  Condition on _WIN64.
	(INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX): Condition on _WIN64.
	(PTRDIFF_MIN): Define as INTPTR_MIN.
	(PTRDIFF_MAX): Define as INTPTR_MAX.
	(SIG_ATOMIC_MIN): Define as INTPTR_MIN.
	(SIG_ATOMIC_MAX): Define as INTPTR_MAX.
2007-05-07 23:42:27 +00:00
Christopher Faylor 5682d0f1a7 * include/cygwin/time.h: Use __cdecl on declaration. Remove
declarations which are duplicated in include/time.h.
2007-04-27 13:34:25 +00:00
Chris Sutcliffe 862eba8666 2007-04-22 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/shellapi.h (NOTIFYICONDATAA, NOTIFYICONDATAW): Updated to support
        Vista.
2007-04-22 11:25:07 +00:00
Chris Sutcliffe f1fc3a03b4 2007-04-20 Matthias Miller <matthiasmiller@users.sourceforge.net>
* include/wincrypt.h (CRYPTPROTECT_PROMPTSTRUCT, CRYPTPROTECT_UI_FORBIDDEN,
  CRYPTPROTECT_LOCAL_MACHINE): Define.
2007-04-20 22:54:24 +00:00
Brian Dessent 09e5bb8e60 * cygwin.sc: Remove duplicated .debug_macinfo section.
* dllfixdbg: Also copy DWARF-2 sections into .dbg file.
2007-04-18 13:11:35 +00:00
Chris Sutcliffe 2351dd18b4 2007-04-15 Piotr Wyderski <piotr.wyderski@wp.pl>
* include/winbase.h (SetInformationJobObject, QueryInformationJobObject):
        Define.
2007-04-15 17:26:46 +00:00
Chris Sutcliffe 2edb06ce62 2007-04-07 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* Makefile.in: Removed mansuffix variable.  Changed mansection to support
        Cygwin man page location.
2007-04-07 10:16:52 +00:00
Corinna Vinschen bde9647c6a * include/stdint.h (WINT_MIN): Fix sign. 2007-04-06 08:25:28 +00:00
Chris Sutcliffe f12b93442f 2007-04-05 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* Makefile.in: Added mansection and mansuffix variables.  Changed mandir
  to support Cygwin man page location.
2007-04-05 20:44:29 +00:00
Corinna Vinschen 26631d2144 * include/stdint.h (WINT_MIN, WINT_MAX): Fix definition. 2007-04-04 07:37:53 +00:00
Chris Sutcliffe 27f9e91155 2007-03-30 Brian Dessent <brian@dessent.net>
* lib/kernel32.def (CreateMemoryResourceNotification@4): Define.
2007-04-01 12:44:04 +00:00
Christopher Faylor c99e136f3d * utils/cygpath.cc (get_long_path_name_w32impl): Close handles returned by
FindFirstFile.
2007-03-31 00:03:25 +00:00
Christopher Faylor e7fd6e5738 * cygwin/external.cc (cygwin_internal): Implement CW_SET_DOS_FILE_WARNING.
* cygwin/include/sys/cygwin.h: Define CW_SET_DOS_FILE_WARNING.
* utils/mount.cc (main): Turn dos file warnings off since we know what we're
doing.
2007-03-30 13:36:06 +00:00
Corinna Vinschen e6fbf13e48 * cygheap.cc (cygheap_init): Fix formatting. Remove comment. Set
shared_prefix depending only on terminal service capability.
	* dcrt0.cc (dll_crt0_1): Don't call set_cygwin_privileges here.
	* fhandler_fifo.cc (fhandler_fifo::open): Create the mutex as global
	object.
	* posix_ipc.cc (ipc_mutex_init): Use cygheap->shared_prefix.
	(ipc_cond_init): Ditto.
	* sec_helper.cc (privilege_name): Make static.  Use LookupPrivilegeName
	directly to be independent of the state of cygheap.
	(set_privilege): Take a LUID as parameter instead of an index value.
	Only print debug output in case of failure.
	(set_cygwin_privileges): Add comment.  Use LookupPrivilegeValue to
	get privilege LUIDs.
	(init_global_security): Call set_cygwin_privileges here.
	* security.h (privilege_name): Drop declaration.
	(set_privilege): Declare according to above change.
	(set_process_privilege): Call privilege_luid to get LUID.
	(_push_thread_privilege): Ditto.
	* shared.cc (open_shared): Add comment.  On systems supporting the
	SeCreateGlobalPrivilege, try to create/open global shared memory first.
	Fall back to local shared memory if that fails.
	* thread.cc (semaphore::semaphore): Use cygheap->shared_prefix.
	* wincap.h (wincapc::has_create_global_privilege): New element.
	* wincap.cc: Implement above element throughout.
2007-03-29 16:37:36 +00:00
Christopher Faylor 2319775273 * spawn.cc (spawn_guts): Start pure-windows processes in a suspended state to
avoid potential DuplicateHandle problems.
2007-03-28 14:34:24 +00:00
Chris Sutcliffe a37bc48dca 2007-03-25 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* Include/_mingw.h: Increment version to 3.12.
2007-03-26 02:11:07 +00:00
Chris Sutcliffe b86d10017a 2007-03-25 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/w32api.h: Increment version to 3.9.
        * Makefile.in: Ditto.
2007-03-26 01:35:24 +00:00
Corinna Vinschen e5e4cdeda7 * include/psapi.h (GetMappedFileName): Fix messed up checkin. 2007-03-23 12:42:50 +00:00
Corinna Vinschen 57ba95d8cf * include/psapi.h (GetMappedFileName): Rename from GetMappedFilenameEx. 2007-03-23 09:17:26 +00:00
Danny Smith 3246efd513 2007-03-22 Brian Ripley <ripleybd@users.sourceforge.net>
* include/_mingw.h (__CRT_INLINE): Make conditional on __GNUC_STDC_INLINE__
2007-03-22 09:43:48 +00:00
Chris Sutcliffe f7ddb59088 2003-03-20 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* Makefile.in: Tweak srcdist to fix build issue.
2007-03-21 00:24:25 +00:00
Keith Marshall a88c650cd4 Add --enable-mingw-manpage-transform configure option. 2007-03-20 23:19:34 +00:00
Danny Smith a4ad579228 * include/_mingw.h (__CRT_INLINE): Ue __gnu_inline__ for gcc 4.2.x too. 2007-03-18 00:23:44 +00:00
Corinna Vinschen bfb968cefd Fix typo. 2007-03-13 13:39:27 +00:00
Corinna Vinschen 15823b9d62 * include/cygwin/stat.h (S_TYPEISSHM, S_TYPEISSEM, S_TYPEISSHM):
Avoid compiler warnings.
2007-03-13 13:22:00 +00:00
Keith Marshall 31e07d86d2 Add manpages for dirname and basename functions. 2007-03-11 00:15:00 +00:00
Keith Marshall af8e63023a Make basename and dirname functions work with path names
containing multibyte character strings.
2007-03-08 23:15:58 +00:00
Chris Sutcliffe 8ca56e23af 2007-03-06 Brandon Sneed <brandon@oqo.com>
* include/setupapi.h: Added SetupConfigureWmiFromInfSectionA
        Added SetupConfigureWmiFromInfSectionW
        Added SetupConfigureWmiFromInfSection define to unicode and non-unicode sections

        * lib/setupapi.def: Added exports for SetupConfigureWmiFromInfSectionA and W

        * include/winuser.h: Added PBT_APMQUERYSUSPEND
        Added PBT_APMQUERYSTANDBY
        Added PBT_APMQUERYSUSPENDFAILED
        Added PBT_APMQUERYSTANDBYFAILED
        Added PBT_APMSUSPEND
        Added PBT_APMSTANDBY
        Added PBT_APMRESUMECRITICAL
        Added PBT_APMRESUMESUSPEND
        Added PBT_APMRESUMESTANDBY
        Added PBT_APMBATTERYLOW
        Added PBT_APMPOWERSTATUSCHANGE
        Added PBT_APMOEMEVENT
        Added PBT_APMRESUMEAUTOMATIC

        * include/wtsapi32.h: New file

        * include/wingdi.h: Added DM_DISPLAYORIENTATION define for use with DMDO_* defines
2007-03-07 23:18:35 +00:00
Christopher Faylor b8804b1ecd * signal.cc (handle_sigprocmask): Remove extraneous sig_dispatch_pending. 2007-03-07 21:51:27 +00:00
Corinna Vinschen fcdca88165 * fhandler_proc.cc: Fix formatting. Drop setting errno when creating
proc file content.
	(format_proc_uptime): Simplify.
	(format_proc_cpuinfo): Align more closely to output of Linux 2.6 kernel.
	Evaluate more data, especially for AMD CPUs.
2007-03-07 14:03:29 +00:00
Corinna Vinschen 2213ad419b Fix log entry. 2007-03-06 16:35:45 +00:00
Corinna Vinschen 7113f5da75 Add accidentally missing checkins.
* fhandler.h (fhandler_base::fstat_helper): Add creation time parameter.
	* glob.cc (stat32_to_stat64): Set st_birthtim to st_mtim.
2007-03-06 16:29:40 +00:00
Corinna Vinschen 74652ce13e * include/cygwin/stat.h (S_TYPEISMQ): Define.
(S_TYPEISSEM): Dttio.
	(S_TYPEISSHM): Ditto.
2007-03-06 14:56:44 +00:00
Corinna Vinschen 70de8290c8 * fhandler_mailslot.cc (fhandler_mailslot::fstat): Set new stat member
st_birthtim to useful value.
	* fhandler_process.cc (fhandler_process::fstat): Ditto.
	* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Take
	additional parameter for creation time.  Fill st_birthtim with it.
	Accomodate additional creation time parameter throughout.
	* fhandler_raw.cc (fhandler_dev_raw::fstat): Set new stat member
	st_birthtim to useful value.
	* fhandler.cc (fhandler_base::fstat): Ditto.
	* fhandler_registry.cc (fhandler_registry::fstat): Ditto.
	* include/cygwin/version.h: Bump API minor number.
	* include/cygwin/stat.h (struct __stat64): Replace st_spare4 with
	timestruc_t st_birthtim.
	(struct stat): Ditto if __CYGWIN_USE_BIG_TYPES__ is defined.
	(st_birthtime): Define if __CYGWIN_USE_BIG_TYPES__ is defined.
2007-03-06 14:48:25 +00:00
Chris Sutcliffe aefbb81cc4 2007-03-05 Jan Nijtmans <nijtmans@users.sourceforge.net>
* include/ddeml.h (DdeCreateStringHandleA, DdeCreateStringHandleW): Switch
        argument to constant.
2007-03-06 01:53:36 +00:00
Danny Smith 3315e811a4 * include/io.h (__mingw_access): New static inline wrapper to restore
pre-Vista 'access (fname, X_OK)'  behaviour.
	(__USE_MINGW_ACCESS): Use to map access() to __mingw_access().
2007-03-05 08:25:32 +00:00
Danny Smith 5643b1ee86 * mingwex/fesetround.c (fesetround): Use unsigned int as operand
to  stmxcsr.
	Thanks to Alexey Kuznetsov <ring0_mipt at users dot sf dot net>
2007-03-05 07:42:36 +00:00
Corinna Vinschen 788e7da136 * ntdll.h (struct _OBJECT_NAME_INFORMATION): Define.
* syscalls.cc (unlink_nt): Check shared directory for being empty
	before trying to move and mark for deletion.
2007-03-02 20:04:26 +00:00
Corinna Vinschen 3532877889 * security.cc (get_file_attribute): Avoid compiler warning. 2007-03-02 19:54:20 +00:00
Christopher Faylor e943a1a37e * fork.cc (fork): Reset child to true after fork since it may have been reset
by fork memory copies.
2007-03-01 18:43:38 +00:00
Christopher Faylor 6e070c257c * Makefile (DLL_OFILES): Remove ntea.o
* environ.cc (set_ntea): Delete.
(parse_thing): Delete "ntea" setting.
* fhandler.cc (fhandler_base::open): Remove allow_ntea considerations.
(check_posix_perm): Ditto.
* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Ditto.
(fhandler_base::open_fs): Ditto.
(fhandler_disk_file::mkdir): Ditto.
* path.cc (symlink_worker): Ditto.
* security.cc (get_file_attribute): Ditto.
(set_file_attribute): Ditto.
* security.h: Remove allow_ntea declaration.
2007-03-01 15:13:47 +00:00
Corinna Vinschen 40303ac9de * path.cc (close_user_proc_parms_cwd_handle): Remove.
(cwdstuff::init): Don't call close_user_proc_parms_cwd_handle.
	Call set to set cwd with all-sharing handle.
	(cwdstuff::set): Fix comment.  Don't close cwd handle.  Set in
	user parameter block instead and close old cwd handle.
	* syscalls.cc (rename): Call unlink_nt instead of RemoveDirectory or
	DeleteFile to allow deleting shared files/directories.
2007-02-27 18:38:22 +00:00
Corinna Vinschen 3323df7e0e * fhandler.cc(fhandler_base::open): Open with READ_CONTROL only in
case of query_open flag set to query_read_control.  Add case for
	new query_read_attributes flag.
	(fhandler_base::fstatvfs): New method.
	* fhandler.h (enum query_state): Add query_read_attributes flag.
	(class fhandler_base): Declare new virtual fstatvfs method.
	(class fhandler_socket): Ditto.
	(class fhandler_pipe): Ditto.
	(class fhandler_fifo): Ditto.
	(class fhandler_disk_file): Ditto.
	(class fhandler_virtual): Ditto.
	* fhandler_disk_file.cc (fhandler_base::fstat_fs): Open with
	query_read_attributes instead of query_read_control.
	(fhandler_disk_file::fstatvfs): New method.
	(fhandler_disk_file::facl): Open with query_read_attributes instead of
	query_read_control.
	* fhandler_fifo.cc (fhandler_fifo::fstatvfs): New method.
	* fhandler_socket.cc (fhandler_socket::fstatvfs): New method.
	(fhandler_socket::fchmod): Return with EBADF in the default case.
	(fhandler_socket::fchown): Ditto.
	(fhandler_socket::facl): Ditto.
	* fhandler_virtual.cc (fhandler_virtual::fstatvfs): Ditto.
	* ntdll.h (struct _FILE_FS_ATTRIBUTE_INFORMATION): Define.
	(struct _FILE_FS_FULL_SIZE_INFORMATION): Define.
	* pipe.cc (fhandler_pipe::fstatvfs): New method.
	* syscalls.cc (fstatvfs): Just call the fhandler's fstatvfs.
	(statvfs): Ditto.
	(fstatfs): Call fstatvfs.
	(statfs): Drop EFAULT handling.
2007-02-27 12:58:56 +00:00
Danny Smith cbf4bfcd5b 2007-02-27 Thorsten Dahlheimer <tdahlheim@gmx.net>
* include/stdio.h (_unlink, unlink): Add prototypes.
2007-02-27 07:40:12 +00:00
Corinna Vinschen 139654836c * fhandler.cc (fhandler_base::fstat): Set all file times to arbitrary
fixed value.
2007-02-26 14:19:00 +00:00
Corinna Vinschen 14e06cca26 * fhandler_registry.cc (registry_listing): Drop name of HKEY_DYN_DATA.
(registry_keys): Drop HKEY_DYN_DATA.
	* net.cc: Fix comment.
	* syslog.cc: Ditto.
2007-02-26 12:39:25 +00:00
Corinna Vinschen 457c7938f0 * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Drop comment.
* mmap.cc (gen_access): Remove.
	(mmap_record::gen_access): Remove.
	(mmap64): Don't mention 9x any longer.
	* syscalls.cc (statvfs): Drop status code consideration for 9x.
	* libc/minires-os-if.c (get_registry_dns_items): Don't mention 9x any
	longer.
	(get_registry_dns): Drop getting registry key on 9x.  Drop is9x
	variable.
2007-02-26 12:22:41 +00:00
Corinna Vinschen a76877e977 Throughout remove all usage of wincap.has_security.
* environ.cc (environ_init): Drop setting allow_ntsec here.
	* grp.cc (initgroups32): Drop usage of label "out".
	* security.cc (allow_ntsec): Set to true by default.
	* syscalls.cc (seteuid32): Remove label success_9x.
	* wincap.cc: Remove has_security throughout.
	* wincap.h: Ditto.
2007-02-23 15:15:50 +00:00
Corinna Vinschen 9fa43ff6c6 * fhandler.h (class fhandler_pipe): Remove members writepipe_exists,
orig_pid and id.  Make hit_eof inline.
	* fhandler_fifo.cc (fhandler_fifo::open): Drop handling of
	writepipe_exists, orig_pid and id.
	* pipe.cc: Ditto throughout.
	(pipecount): Remove.
	(pipeid_fmt): Remove.
	(fhandler_pipe::hit_eof): Simplify.  Move to fhandler.h.
	(fhandler_pipe::dup): Drop leave label.
	(fhandler_pipe::create): Drop has_unreliable_pipes case.
	* wincap.cc: Remove has_unreliable_pipes throughout.
	* wincap.h: Ditto.
2007-02-23 14:47:45 +00:00
Corinna Vinschen 296a8a6369 * devices.in: Change native device name to native NT device name for
/dev/null, /dev/comX and /dev/ttySx.
	* devices.cc: Regenerate.
	* fhandler.cc (fhandler_base::open_9x): Remove.
	(fhandler_base::open): Don't test for DOS device name, don't call
	open_9x.
	(fhandler_dev_null::open): Remove.
	* fhandler.h (class fhandler_base): Drop open_9x declaration.
	(class fhandler_dev_null): Drop open declaration.
2007-02-23 14:20:28 +00:00
Corinna Vinschen b5cb5c9e64 * fhandler_console.cc (fhandler_console::need_invisible): Drop
pty_needs_alloc_console check.
	* spawn.cc (spawn_guts): Ditto.
	(av::fixup): Remove setting iscui.
	* syscalls.cc (rename): Drop has_move_file_ex checks.  Remove 9x
	specific code.
	* wincap.cc: Remove has_move_file_ex and pty_needs_alloc_console
	throughout.
	* wincap.h: Ditto.
2007-02-23 12:01:52 +00:00
Corinna Vinschen 7131554a69 Throughout remove using wincap.
* Makefile.in (OBJS): Remove wincap.o.
	* README: Don't mention 9x.
	* bsd_mutex.cc (_mtx_unlock): Drop checking for 9x error codes.
	* cygserver.cc (server_submission_loop::request_loop): Add FIXME
	comment.
	* wincap.cc: Remove.
	* wincap.h: Remove.
	* woutsup.h: Don't include wincap.h.
2007-02-23 11:43:48 +00:00
Corinna Vinschen aaee2ffaed * exceptions.cc (dummy_ctrl_c_handler): Remove.
(init_console_handler): Drop has_null_console_handler_routine checks.
	* fhandler_raw.cc (fhandler_dev_raw::open): Drop has_raw_devices check.
	* fhandler_serial.cc (fhandler_serial::open): Drop
	.supports_reading_modem_output_lines check.
	* miscfuncs.cc (low_priority_sleep): Drop has_switch_to_thread check.
	* shared.cc (open_shared): Drop needs_memory_protection checks.
	* spawn.cc (spawn_guts): Drop start_proc_suspended check.
	* uname.cc (uname): Drop has_valid_processorlevel check.
	* wincap.cc: Remove has_raw_devices, has_valid_processorlevel,
	supports_reading_modem_output_lines, needs_memory_protection,
	has_switch_to_thread, start_proc_suspended and
	has_null_console_handler_routine throughout.
	* wincap.h: Ditto.
2007-02-23 10:51:59 +00:00
Corinna Vinschen 0ed760d75e * fhandler.cc (fhandler_base::lseek): Drop 9x considerations.
* fhandler_disk_file.cc (fhandler_disk_file::lock): Ditto.
	* wincap.cc: Remove lock_file_highword and has_64bit_file_access
	throughout.
	* wincap.h: Ditto.
2007-02-23 09:49:49 +00:00
Corinna Vinschen 8e17bd8685 * cygheap.h (struct cwdstuff): Remove sync member and keep_in_sync
accessors.
	* external.cc (cygwin_internal): Drop call to cygheap->cwd.keep_in_sync.
	* fhandler_disk_file.cc (fhandler_disk_file::link): Always presume
	ability to create hard links.
	* path.cc (cwdstuff::init): Drop 9x considerations.
	(cwdstuff::keep_in_sync): Remove.
	(cwdstuff::set): Take NT for granted.
	* pinfo.h (cygwin_pid): Just return pid.
	* wincap.cc: Remove has_hard_links, can_open_directories,
	has_negative_pids, has_named_pipes, has_try_enter_critical_section,
	cant_debug_dll_entry and detect_win16_exe throughout.
	* wincap.h: Ditto.
2007-02-22 18:01:13 +00:00
Corinna Vinschen 3af640487f * fhandler_console.cc (fhandler_console::read): Drop 9x specific
handling of AltGr key.
	* mmap.cc: Take NT for granted throughout.
	* wincap.cc: Remove map_view_of_file_ex_sucks, altgr_is_ctrl_alt,
	has_working_copy_on_write, share_mmaps_only_by_name,
	virtual_protect_works_on_shared_pages, has_mmap_alignment_bug and
	has_working_virtual_lock throughout.
	* wincap.h: Ditto.
2007-02-22 17:35:14 +00:00
Corinna Vinschen eef57fe1e3 * fhandler.cc (fhandler_base::set_no_inheritance): Always use
SetHandleInformation.
	* fhandler_disk_file.cc (fhandler_disk_file::lock): Always use
	UnlockFileEx/LockFileEx functions.
	* net.cc (fdsock): Don't bother to duplicate socket for inheritance.
	* sysconf.cc (get_nproc_values): Take NT for granted.
	(get_avphys): Ditto.
	* syslog.cc (WIN95_EVENT_LOG_PATH): Remove define.
	(get_win95_event_log_path): Remove.
	(vsyslog): Fix formatting.  Take NT for granted.
	* wincap.cc: Remove has_lock_file_ex, has_signal_object_and_wait,
	has_eventlog, has_set_handle_information,
	has_set_handle_information_on_console_handles and supports_smp
	throughout.
	* wincap.h: Ditto.
2007-02-22 17:09:46 +00:00
Corinna Vinschen 64f211c87c Fix typo. 2007-02-22 16:33:44 +00:00
Corinna Vinschen 03d5ce6d08 * dir.cc (rmdir): Move existance check in front of
has_dot_last_component check.  Simply setting errno in latter case.
2007-02-22 16:32:39 +00:00
Corinna Vinschen e9095199cc * fhandler.cc (fhandler_base::write): Remove wincap.has_lseek_bug case.
Simplify seek beyond EOF case.
	* times.cc (times): Remove wincap.has_get_process_times case.
	* wincap.cc: Remove has_delete_on_close, has_page_guard,
	has_get_process_times and has_lseek_bug throughout.
	* wincap.h: Ditto.
2007-02-22 16:22:38 +00:00
Corinna Vinschen 501f1020f9 Throughout remove all usage of wincap.access_denied_on_delete.
* dir.cc (rmdir): Add existance check to be errno-compatible with Linux.
	* fhandler_disk_file.cc (fhandler_disk_file::rmdir): Drop test for
	non-existent dir on 9x share.
	* syscalls.cc (unlink): Add comment.
	* wincap.cc: Remove access_denied_on_delete flag throughout.
	* wincap.h: Ditto.
2007-02-22 16:04:19 +00:00
Corinna Vinschen e387a378b4 * fhandler_disk_file.cc (fhandler_disk_file::closedir): Fix bug
introduced by switching to NtClose.
2007-02-22 15:07:21 +00:00
Christopher Faylor 39fc0d36ae * dcrt0.cc (child_info_fork::alloc_stack_hard_way): Change sense of guard test.
Increase size of stack reserved and increase size before the current stack
pointer.  Use pointers when doing arithmetic.
(dll_crt0_1): Initialize exception handler when we notice we're the child of a
fork from non-main thread.
* fork.cc (frok::parent): Make argument volatile.
(frok::child): Ditto.
(lock_signals): New class.
(lock_pthread): Ditto.
(hold_everhthing): Ditto.
(frok::parent): Move atforkprepare and atforkparent to lock_pthread class.
(fork): Make ischild boolean.  Use hold_everything variable within limited
scope to set various mutexes in such a way as to avoid deadlocks.
* thread.h (pthread_mutex::tid): New variable, active when debugging for
tracking thread id of owner.
(pthread_mutex::set_owner): Set tid when debugging.
* thread.cc (pthread_mutex::pthread_mutex): Clear tid.
(pthread_mutex::_unlock): Ditto when unlocking.
(pthread_mutex::fixup_after_fork): Set tid to special value after forking since
owner is unknown.
2007-02-22 12:34:55 +00:00
Corinna Vinschen bd8f891e8a Throughout replace all usage of wincap.shared with the constant
FILE_SHARE_VALID_FLAGS.
	* fhandler.cc (fhandler_base::open_9x): Drop local variable shared.
	* wincap.cc: Remove shared member throughout.
	* wincap.h: Ditto.
2007-02-22 11:17:01 +00:00
Corinna Vinschen 570858c30f * Makefile.in (DLL_IMPORTS): Add libntdll.a.
* autoload.cc: Remove all symbols from advapi32.dll, kernel32.dll and
	ntdll.dll available on all platforms since NT4.

	Throughout remove all usage of wincap.is_winnt.
	* dcrt0.cc (dll_crt0_0): Remove call to mmap_init.
	* fhandler.h (class fhandler_base): Remove has_changed flag.
	(fhandler_disk_file::touch_ctime): Remove declaration.
	(fhandler_disk_file::readdir_9x): Ditto.
	(fhandler_disk_file::touch_ctime): Remove.
	(fhandler_disk_file::readdir_9x): Remove.
	(fhandler_disk_file::closedir): Call NtClose instead of CloseHandle.
	* mmap.cc: Throughout call CreateMapping and MapView directly.
	(VirtualProt9x): Remove.
	(VirtualProtNT): Remove.
	(VirtualProtEx9x): Remove.
	(VirtualProtExNT): Remove.
	(VirtualProtect): Remove define.
	(VirtualProtectEx): Remove define.
	(CreateMapping9x): Remove.
	(CreateMappingNT): Rename to CreateMapping.
	(MapView9x): Remove.
	(MapViewNT): Rename to MapView.
	(struct mmap_func_t): Remove definition.
	(mmap_funcs_9x): Remove.
	(mmap_funcs_nt): Remove.
	(mmap_func): Remove.
	(mmap_init): Remove.
	* net.cc (getdomainname): Drop comment. Use NT4 registry key only.
	(get_95_ifconf): Remove.
	* pinfo.cc (winpids::enumNT): Rename to winpids::enum_processes.
	(winpids::enum9x): Remove.
	(winpids::set): Just call enum_processes directly.
	(winpids::enum_init): Ditto.
	* pinfo.h (class winpids): Drop enum_processes pointer.  Rename
	enumNT to enum_processes.  Drop enum9x declaration.  Drop initialization
	of enum_processes throughout.
	* registry.cc (get_registry_hive_path): Just create NT key.
	(load_registry_hive): Only load NT specific file.
	* syscalls.cc (unlink_9x): Remove.
	(unlink): Just call unlink_nt.
	* wincap.cc: Remove is_winnt flag throughout.
	* wincap.h: Ditto.
	* winsup.h: Remove mmap_init declaration.
2007-02-22 10:54:47 +00:00
Corinna Vinschen 8782b2a2af * ipcs.c (_POSIX2_LINE_MAX): Drop definition. 2007-02-22 10:53:37 +00:00
Corinna Vinschen 3fbf471f35 * Makefile.in (OBJS): Drop transport_sockets.o.
* sysv_shm.cc (shmget_allocate_segment): Remove spurious cast.
	* transport.cc: Don't include transport_sockets.h.
	(create_server_transport): Always create transport_layer_pipes.
	* transport_sockets.cc: Remove.
	* transport_sockets.h: Remove.
2007-02-22 10:50:51 +00:00
Corinna Vinschen bc455088cf * wincap.cc (wincap_unknown): Change settings for unknown to reflect
the capabilities of NT4.
	(wincap_95): Remove.
	(wincap_95osr2): Remove.
	(wincap_98): Remove.
	(wincap_98se): Remove.
	(wincap_me): Remove.
	(wincap_nt3): Remove.
	(wincapc::init): Temporarily bail out on any 9x system.
2007-02-21 15:18:07 +00:00
Corinna Vinschen 7db9fabc83 * cygcheck.cc (dump_sysinfo): Add "not supported" to osname on 9x
machines.  Drop "not supported" for Vista.  Drop "Longhorn" text
	for now.
2007-02-20 16:41:54 +00:00
Corinna Vinschen 8fbd574ef0 * cygwin.din (sem_unlink): Export.
* posix_ipc.cc: Include thread.h and semaphore.h.  Remove TODO
	comment.
	(ipc_names): Add max_len member.  Set to maximum length of the path
	before tacking on the prefix path.  Set prefix path for named semaphors
	to /dev/shm, as on Linux.
	(enum ipc_type_t): Change sem to semaphore to avoid name conflicts.
	(check_path): Detect empty paths.  Use ipc_names's max_len member.
	Use __small_sprintf to create full object path name.  Special case
	semaphores.
	(ipc_cond_init): Drop superfluous strcpy.
	(class ipc_flock): New class to simplify file locking in subsequent
	code.
	(struct mq_hdr): Raise size of mqh_uname to allow adding a unique
	LUID to the name.
	(mq_open): Fix formatting.  Create unique synchronization object names
	using AllocateLocallyUniqueId.
	(struct sem_finfo): New structure defining named semaphore file content.
	(sem_open): Move here.  Rework implementation to allow kernel
	persistent implementation of POSIX named semaphores.
	(_sem_close): Implement sem_close.
	(sem_close): Move here.  Just call _sem_close with do_close parameter
	set to true.
	(sem_unlink): New function.
	* pthread.cc (mangle_sem_name): Remove.
	(sem_open): Move to posix_ipc.cc.
	(sem_close): Ditto.
	* syscalls.cc (close_all_files): Call semaphore::terminate here.
	* thread.cc: Fix formatting.  Rearrange semaphore functions so that
	they are close together.
	(semaphore::semaphore): Rework to play nicely with new named semaphore
	implementation.
	(semaphore::_terminate): Call _sem_close if semaphore is a named
	semaphore.
	(semaphore::destroy): Don't destroy named semaphores.  Return EINVAL
	instead.
	(semaphore::close): Only destroy named semaphores.  Return EINVAL
	otherwise.
	(semaphore::open): Rework to play nicely with new named semaphore
	implementation.  Loop through existing semaphores to be able to
	return same sem_t pointer as a former call on the same named semaphore.
	(semaphore::getinternal): New function called from _sem_close.
	* thread.h (class List): Make mx and head public.
	(class semaphore): Fix formatting.  Align method declarations with
	implementation in thread.cc.  Add members used for named semaphores.
	(semaphore::terminate): New static method.
	* include/semaphore.h: Redefine SEM_FAILED.  Fix formatting.
	(sem_unlink): Add declaration.
	* include/cygwin/version.h: Bump API minor number.
2007-02-20 15:48:04 +00:00
Christopher Faylor d0cf179299 * exceptions.cc (_cygtls::signal_exit): Only call myself.exit when when
exit_state indicates that we've visited do_exit.
* sync.h (lock_process::lock_process): Use renamed exit_state -
ES_PROCESS_LOCKED.
* winsup.h: Rename ES_MUTO_SET to ES_PROCESS_LOCKED.
2007-02-20 14:31:26 +00:00
Corinna Vinschen 4997a508c8 * fhandler_socket.cc (fhandler_socket::bind): Remove printing wrong
errno in debug output.
2007-02-20 09:48:31 +00:00
Christopher Faylor 510a85cbf9 Remove extraneous whitespace.
* pinfo.cc (commune_process): Use default argument to lock_process.
* sigproc.cc: Update copyright.
* select.cc: Ditto.
2007-02-20 00:16:18 +00:00
Danny Smith c30b7cc622 Correct spelling of submitter's name in ChangeLog. 2007-02-18 09:57:51 +00:00
Danny Smith 8cf2dca12b 2007-02-18 Aurimas Cernius <aurisc4@gmail.com>
* include/excpt.h:  Replace "_try1" in comments  with "__try1".
2007-02-18 09:46:48 +00:00
Danny Smith 6542214e59 2007-02-18 Jiri Malak <jiri.malak@iol.cz>
* include/windef.h [WATCOM]: Fix !NONAMELESSUNION defines.
	* include/winnt.h [WATCOM] (GetCurrentFiber, GetFiberData):
	Add prototypes.
	[WATCOM] (NtCurrentTeb): Add protype and inline asm definition.

2007-02-18  Vesa Jskelinen  <chaac@users.sourveforge.net>

	* lib/user32.def (InternalGetWindowText): Add stub.
2007-02-18 08:08:12 +00:00
Corinna Vinschen eb8a6636bf * posix_ipc.cc (mq_open): Avoid compiler warning. Initialize mqhdr
before using it in file exists case.
	* include/mqueue.h (mqd_t): Make non-pointer type.
2007-02-15 17:49:25 +00:00
Corinna Vinschen 93162be554 * posix_ipc.cc (ipc_mutex_init): Create global object name.
(ipc_cond_init): Ditto.
	(struct mq_hdr): Add mqh_uname member to store synchronization object
	name.
	(mq_open): Create unique synchronization object name and store in
	mq_hdr->mqh_uname.  Use this name in calls to ipc_mutex_init and
	ipc_cond_init.
2007-02-15 11:28:46 +00:00
Danny Smith 18c27356c4 * Makefile.in (ALL_CFLAGS): Put W32API_INCLUDE after INCLUDES.
(ALL_CXXFLAGS): Likewise.
	* mingwex/Makefile.in (ALL_CFLAGS): Put W32API_INCLUDE after INCLUDES.
	(ALL_CXXFLAGS): Likewise.
	* profile/Makefile.in (ALL_CFLAGS): Put W32API_INCLUDE after INCLUDES.
	(ALL_CXXFLAGS): Likewise.
2007-02-14 23:42:07 +00:00
Corinna Vinschen 7b487ba942 * Makefile.in (DLL_OFILES): Add posix_ipc.o.
* cygwin.din (mq_close): Export.
	(mq_getattr): Export.
	(mq_notify): Export.
	(mq_open): Export.
	(mq_receive): Export.
	(mq_send): Export.
	(mq_setattr): Export.
	(mq_timedreceive): Export.
	(mq_timedsend): Export.
	(mq_unlink): Export.
	* posix_ipc.cc: New file implementing the above functions.  Move
	shm_open and shm_unlink from syscalls.cc here.
	* sysconf.cc (sca): Set value of _SC_MQ_OPEN_MAX to MQ_OPEN_MAX,
	_SC_MQ_PRIO_MAX to MQ_PRIO_MAX, _SC_MESSAGE_PASSING to
	_POSIX_MESSAGE_PASSING.
	* include/limits.h (MQ_OPEN_MAX): Define.
	(MQ_PRIO_MAX): Define.
	* include/mqueue.h: New file.
	* include/cygwin/version.h: Bump API minor number.
2007-02-14 10:06:46 +00:00
Corinna Vinschen af52f2802f * include/cygwin/stdlib.h (valloc): Declare.
(memalign): Declare.
2007-02-13 18:55:49 +00:00
Chris Sutcliffe b46bc8f5f5 2007-02-11 Daniel Atallah <datallah@users.sourceforge.net>
* include/winnt.h (LANG_SERBIAN_NEUTRAL, LANG_BOSNIAN,
LANG_BOSNIAN_NEUTRAL): Define.

2007-02-11  Daniel Schlyder  <thrug@users.sourceforge.net>

* include/winuser.h: Add guards around TITLEBARINFO and
GetTitleBarInfo().
2007-02-11 14:32:24 +00:00