Commit Graph

9957 Commits

Author SHA1 Message Date
Corinna Vinschen a888c0799c * ntdll.h (STATUS_NO_SUCH_FILE): Define.
* path.cc (get_nt_native_path): Reset upath.Length to 0 on each
	invocation.
	(symlink_info::check): Use NT native functions.
2007-08-23 07:43:24 +00:00
Corinna Vinschen e1e4b104b6 * uinfo.cc (pwdgrp::load): Use NT native functions. 2007-08-21 17:38:27 +00:00
Corinna Vinschen 2e9fe498f2 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Rewrite checking
for executable file magic using a thread safe method and re-enable this
	code.
2007-08-21 15:37:10 +00:00
Corinna Vinschen f5f0ae3e26 * syscalls.cc (unlink_nt): Drop one local FILE_BASIC_INFORMATION struct. 2007-08-21 12:39:53 +00:00
Corinna Vinschen 1b61bf152b * ntdll.h (NtNotifyChangeDirectoryFile): Declare.
(NtQueryAttributesFile): Move to maintain alphabetical order of
	declarations.  Add comment to note that timestamp information returned
	by NtQueryAttributesFile is unreliable.
	* path.h (etc::changed_h): Move here.
	(etc::fn): Change type to OBJECT_ATTRIBUTES.
	(etc::last_modified): Change type to LARGE_INTEGER.
	(etc::init): Take PUNICODE_STRING as second argument.
	* path.cc: Accomodate above changes.
	(etc::test_file_change): Use NT native functions.
	(etc::dir_changed): Ditto.
	* uinfo.cc (pwdgrp::load): Call etc::init with NT native path.
2007-08-21 12:37:40 +00:00
Corinna Vinschen 66e36b7987 * fhandler_disk_file.cc: Change debugging output througout to print
the NT status consistently.  Use UNICODE path information if available.
2007-08-21 12:09:38 +00:00
Ben Elliston 3c527a31f3 Bring over from the GCC tree:
2007-08-21  Richard Guenther  <rguenther@suse.de>

 	* configure.ac: Add types checking to stage1 checking flags.
	* configure: Regenerate.
2007-08-21 04:15:07 +00:00
Corinna Vinschen 891b6e885e * hookapi.cc (ld_preload): Call LoadLibraryW.
* path.h (path_conv::get_wide_win32_path_len): Define.
2007-08-20 15:41:08 +00:00
Corinna Vinschen 876da7fb74 * fhandler.cc (rootdir): Delete.
* winsup.h (rootdir): Drop declaration.
2007-08-20 15:16:27 +00:00
Corinna Vinschen decbb5d387 * path.cc (fillout_mntent): Append backslash to drive-only paths before
calling fs_info::update.
	* path.h (fs_info::clear): Simplify.
	(fs_info::fs_info): Add constructor.
2007-08-19 15:55:06 +00:00
Joseph Myers fcc5fef0b0 2007-08-18 Paul Brook <paul@codesourcery.com>
Joseph Myers  <joseph@codesourcery.com>

	* Makefile.tpl (DEBUG_PREFIX_CFLAGS_FOR_TARGET): New.
	(CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Include it.
	* Makefile.in: Regenerate.
	* configure.ac (--with-debug-prefix-map): New.
	* configure: Regenerate.

config:
2007-08-18  Paul Brook  <paul@codesourcery.com>
            Joseph Myers  <joseph@codesourcery.com>

	* mt-gnu (CXXFLAGS_FOR_TARGET): Add
	$(DEBUG_PREFIX_CFLAGS_FOR_TARGET).
2007-08-18 15:19:10 +00:00
Corinna Vinschen 5b62123cf6 * spawn.cc (spawn_guts): Fix typo in comment. 2007-08-17 20:22:24 +00:00
Corinna Vinschen e0bdf94f32 * autoload.cc (CloseDesktop): Define.
(CreateDesktopA): Define.
	(SetThreadDesktop): Define.
	* spawn.cc (spawn_guts): When starting a process under another user
	account, don't open up permissions on current window station and
	desktop.  Instead, if not in interactive session, create a new per-user
	window station plus default desktop and use that for the child process.
2007-08-17 19:58:57 +00:00
Richard Sandiford 2ad518b5a0 2007-08-17 Richard Sandiford <richard@codesourcery.com>
Nigel Stephens  <nigel@mips.com>

	* config/mt-sde: New file.
	* configure.ac (mips*-sde-elf*): New stanza.  Use config/mt-sde
	as target_makefile_frag.
	* configure: Regenerate.
2007-08-17 13:15:24 +00:00
Alexandre Oliva 2b41ef78c2 * Makefile.def (STAGE2_CFLAGS, STAGE3_CFLAGS, STAGE4_CFLAGS):
Add to flags_to_pass.  Adjust uses of BOOT_CFLAGS.
(bootstrap2-debug, bootstrap-debug): New bootstrap stages.
* Makefile.tpl (STAGE2_CFLAGS, STAGE3_CFLAGS, STAGE4_CFLAGS): New.
(do-compare, do-compare3, do-compare-debug): New.
([+compare-target+]): Use them.
2007-08-17 00:03:44 +00:00
H.J. Lu 49813813a7 bfd/
2007-08-16  H.J. Lu  <hongjiu.lu@intel.com>

	* elf.c: Revert last change.

binutils/

2007-08-16  H.J. Lu  <hongjiu.lu@intel.com>

	* readelf.c: Revert last change.

include/elf/

2007-08-16  H.J. Lu  <hongjiu.lu@intel.com>

	* common.h: Revert last change.
2007-08-16 18:49:42 +00:00
Corinna Vinschen f4c963630e * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Handle S_IFSOCK
mode bit by setting the SYSTEM attribute.
	* fhandler_socket.cc (fhandler_socket::fchmod): Add S_IFSOCK mode bit
	when calling fhandler_disk_file::fchmod.  Don't set attributes here.
2007-08-16 16:59:25 +00:00
Corinna Vinschen 29992bf3da * path.h (path_conv::operator char *): Delete.
(path_conv::operator const char *): Delete.
	* dlfcn.cc: Throughout, replace path_conv::operator char * and
	path_conv::operator const char * by call to path_conv::get_win32
	for easier transition to UNICODE_PATHs.
	* fhandler_socket.cc: Ditto.
	* hookapi.cc: Ditto.
	* path.cc: Ditto.
	* spawn.cc: Ditto.
	* syscalls.cc: Ditto.
	* uinfo.cc: Ditto.
2007-08-16 15:07:42 +00:00
Corinna Vinschen 29fec364c0 * dir.cc (readdir_worker): Convert w32name to PUNICODE_STRING.
* sec_acl.cc (getacl): Convert debug output to print native NT path.
	* security.cc (set_file_attribute): Ditto.
	* syscalls.cc (try_to_bin): Ditto and fix buggy debug statement.
2007-08-16 14:46:23 +00:00
Corinna Vinschen dec9daad4a * ntdll.h (RtlAcquirePebLock): Declare.
(RtlReleasePebLock): Declare.
	* path.cc (cwdstuff::set): Change PEB only while it's locked.
2007-08-16 14:30:53 +00:00
Corinna Vinschen bd61a7f7b9 * fhandler.h (fhandler_base::get_namehash): Use NT native path.
* fhandler_disk_file.cc (readdir_get_ino): Ditto in call to
	hash_path_name.
2007-08-16 14:10:06 +00:00
H.J. Lu 0abbc9f1d0 bfd/
2007-08-16  H.J. Lu  <hongjiu.lu@intel.com>

	* elf.c (get_segment_type): Change PT_GNU_STACK to PT_GNU_ATTR.
	(bfd_section_from_phdr): Likewise.
	(get_program_header_size): Likewise. Add a PT_GNU_ATTR segment
	if there is an attribute section.
	(_bfd_elf_map_sections_to_segments): Likewise.
	(IS_SECTION_IN_INPUT_SEGMENT): Likewise.

binutils/

2007-08-16  H.J. Lu  <hongjiu.lu@intel.com>

	* readelf.c (get_segment_type): Change PT_GNU_STACK to
	PT_GNU_ATTR.

include/elf/

2007-08-16  H.J. Lu  <hongjiu.lu@intel.com>

	* common.h (PT_GNU_STACK): Renamed to ...
	(PT_GNU_ATTR): This.
	(PT_GNU_STACK): New.  Make an alias of PT_GNU_ATTR.
2007-08-16 13:38:09 +00:00
Corinna Vinschen 855e63eb4b * ntdll.h (RtlCreateUnicodeStringFromAsciiz): Fix declaration.
(RtlUpcaseUnicodeChar): Declare.
	* path.cc (hash_path_name): Split into three functions, taking
	the path as char *, PWCSTR, or PUNICODE_STRING.  Move implementation
	into PUNICODE_STRING-based function.  Drop old drive-relative path
	consideration.
	* winsup.h (iswdirsep): Like isdirsep but for WCHARs.
	(isabspath_u): Like isabspath, for PUNICODE_STRINGs.
	(iswabspath): Like isabspath, for PWCHARs.
	(hash_path_name): Add new declarations.
2007-08-16 10:41:45 +00:00
Corinna Vinschen c4bd837700 * path.cc (get_nt_native_path): Allow to convert special paths which
have no native NT path representation for simplified debug output.
	* syscalls.cc: Convert debug output to print native NT path.
	(unlink): Drop redundant debug output.
2007-08-15 16:27:09 +00:00
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
Jeff Johnston a9a6f94229 2007-08-13 Carlos O'Donell <carlos@codesourcery.com>
* arm/crt0.S: Remove '.set' for __stack, hardware_init_hook,
	and software_init_hook.
2007-08-13 18:13:39 +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
Nick Clifton e31a79b1d6 * standards.texi: Import 22 July 2007 version.
* fdl.texi: Import version 1.2.
* make-stds.texi: Import 2006 version.
2007-08-13 09:45:22 +00:00
Ben Elliston fc7c811f03 * configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS, baseargs): Pass
--silent if $silent.
	* configure: Regenerate.
2007-08-13 01:32:36 +00:00
Christopher Faylor 8b6f3d4c86 * faq-programming.xml: Clarify where to run "make check". 2007-08-12 19:45:45 +00:00
Daniel Jacobowitz e30c67e6cc * src-release (DEVO_SUPPORT): Add COPYING3 and COPYING3.LIB. 2007-08-12 19:05:42 +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
Jeff Johnston 847e89f8e1 2007-08-10 Carlos O'Donell <carlos@codesourcery.com>
2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>

        * arm/syscalls.c (_stat): Use _close

        * arm/syscalls.c (struct poslog): Rename to...
        (struct fdent): ... this.
        (FILE_HANDLE_OFFSET): Remove.
        (findslot): Return a struct fdent* if fd is valid, otherwise return NULL.
        (newslot): New function.
        (remap_handle): Remove.
        (initialise_monitor_handles): Use stdout as fallback for stderr.
        (wrap): Rename to...
        (checkerror): ...  this.
        (_swiread): Use checkerror() for the return of SWI calls.  Correct the use of r0.
        (_read): Use findslot().  Return EBADF on bad handle.
        (_swilseek): Call findslot().  Check for valid whence.  Check for negative offset when using
        SEEK_CUR, and check for overflow.  Use checkerror().  Check *_Flen calls for errors.
        (_swiwrite): Correct the use of r0.
        (_write): Call findslot().
        (_swiopen): Call findslot().  Check for valid flags.  Use checkerror().  Call newslot().
        Handle O_TRUNC, and O_WRONLY.  Return index into openfiles[] for fd.
        (_swiclose): Correct the use of r0.
        (_close): Handle stderr == stdout case.  Only reclaim handle if _swiclose succeeded.
        (_getpid): Use __attribute__((unused)).
        (_sbrk): Fix formatting.
        (_swistat): New function.
        (_stat): Call _swistat().
        (_fstat): Call _swistat().
        (_unlink): Correct the use of r0.
        (isatty): Call finslot().  Correct the use of r0.
        (_system): Call checkerror().  Correct the use of r0.
        (_rename): Correct the use of r0.
2007-08-10 19:36:46 +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
Jeff Johnston 90c6084b56 2007-08-03 Ralf Corsepius <ralf.corsepius@rtems.org>
* libc/include/tar.h: New.
2007-08-03 21:03:40 +00:00