Commit Graph

7193 Commits

Author SHA1 Message Date
Paolo Bonzini 7fc2ca22c1 2005-02-28 Paolo Bonzini <bonzini@gnu.org>
Sync from gcc.

	2005-02-28  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/17383
	* Makefile.def (target_modules): Remove "stage", now unnecessary.
	* Makefile.tpl (HOST_SUBDIR): New substitution.
	(STAGE_HOST_EXPORTS, EXPECT, HOST_LIB_PATH, USUAL_AR_FOR_TARGET,
	USUAL_AS_FOR_TARGET, USUAL_DLLTOOL_FOR_TARGET, USUAL_GCC_FOR_TARGET,
	USUAL_LD_FOR_TARGET, USUAL_NM_FOR_TARGET, USUAL_OBJDUMP_FOR_TARGET,
	USUAL_RANLIB_FOR_TARGET, USUAL_WINDRES_FOR_TARGET): Use it.
	(Host modules, Bootstrapped modules): Use it.
	(Build modules, Target modules): Do not create symlink trees,
	always configure out-of-srcdir.
	(distclean): Try removing $(host_subdir) with rm before using rm -rf.
	* configure.in (FLAGS_FOR_TARGET, CC_FOR_TARGET, GCJ_FOR_TARGET,
	GFORTRAN_FOR_TARGET, CXX_FOR_TARGET, RAW_CXX_FOR_TARGET): Use
	$(HOST_SUBDIR).  Create a symlink for host_subdir.

	* Makefile.in: Regenerate.
	* configure: Regenerate.

	Merged from libada-gnattools-branch:
	2004-11-28  Nathanael Nerode  <neroden@gcc.gnu.org>

	* Makefile.def: Add gnattools as a module, depending on target-libada.
	* Makefile.in: Regenerate.
	* configure.in: Include gnattools in host_tools; disable it if ada
	is disabled.
	* configure: Regenerate.

config:
2005-02-28  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/17383
	* acx.m4 (GCC_TOPLEV_SUBDIRS): Set HOST_SUBDIR if an in-src
	gcc build is going.
2005-02-28 14:07:03 +00:00
Corinna Vinschen 496337c9a5 * fhandler.h (class fhandler_socket): Declare new method
set_socketpair_eids.
	* fhandler_socket.cc (fhandler_socket::set_socketpair_eids): New method.
	(fhandler_socket::dup): Duplicate sec_pipe if necessary.
	(fhandler_socket::listen): Only create sec_pipe if named pipes are
	available. Initialized sec_peer_pid to 0 as on Linux.
	(fhandler_socket::connect): Only run eid credential transaction if
	named pipes are available.  Fake otherwise. Initialized sec_peer_pid
	to 0 as on Linux.
	(fhandler_socket::accept): Ditto.
	(fhandler_socket::close): Move closing sec_pipe handle from here...
	(fhandler_socket::~fhandler_socket): ... to here.
	* net.cc (socketpair): Set eid credentials by calling
	fhandler_socket::set_socketpair_eids() on both socket ends.
	* wincap.h (wincaps::has_named_pipes): New element.
	* wincap.cc: Implement above element throughout.
2005-02-28 13:11:50 +00:00
Christopher Faylor 882a0c8507 remove unneeded blank line 2005-02-28 01:55:45 +00:00
Christopher Faylor 9dc6005ae2 * regtool.cc (opts): The argument to 'K' is not optional.
(main): Revert previous change.  Just let getopt deal with missing argument.
2005-02-27 17:55:54 +00:00
Christopher Faylor 2391eea57e * regtool.cc (main): Avoid a SEGV when nothing follows -K. 2005-02-27 06:10:58 +00:00
Christopher Faylor d61925786a * sigproc.cc (_pinfo::set_ctty): Move function
* pinfo.cc (_pinfo::set_ctty): to here.
* fhandler_mem.cc (fhandler_dev_mem::fstat): Don't fill out structure if this
is an on-disk device rather than an "auto" device.
* fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto.
* path.cc (normalize_posix_path): Don't treat a standalone '//' as introducing
a UNC path.
(normalize_win32_path): Ditto.
2005-02-27 04:30:08 +00:00
Christopher Faylor 78d9eaa5ea * kill (getsig): Avoid buffer overflow when generating a signal name.
* strace.cc (handle_output_debug_string): Make error a little more specific.
2005-02-27 03:03:19 +00:00
Christopher Faylor 1a9a235a5a * debug.cc (delete_handle): Report on handle value in debugging output.
* pinfo.h (_pinfo::exists): Declare "new" function.
(_pinfo::kill): Ditto.
* fhandler_termios.cc (tty_min::kill_pgrp): Use _pinfo::exists rather than
proc_exists.
* pinfo.cc (pinfo::init): Ditto.  Don't do a low_priority_sleep(0) when looping
to find exec'ed procinfo.
(pinfo::release): Be more careful about unmapping and closing.
* signal.cc (_pinfo::kill): Rename from kill_worker.  Accommodate entry into
_pinfo class.
(kill0): Use _pinfo::kill rather than kill_worker.
(kill_pgrp): Ditto.  Use _pinfo::exists rather than proc_exists.
* sigproc.cc (_pinfo::exists): Rename from proc_exists.
(pid_exists): Use _pinfo::exists rather than proc_exists.
(remove_proc): Ditto.
* sigproc.h (proc_exists): Delete declaration.
2005-02-26 20:50:25 +00:00
Jeff Johnston 92a7e06eb8 2005-02-25 Ralf Corsepious <ralf.corsepius@rtems.org>
* libm/common/fdlibm.h (FLT_UWORD_MAX, FLT_UWORD_HALF_MAX): Add
        L qualifier for these long constants.
2005-02-25 22:38:46 +00:00
Jeff Johnston 1139537a25 2005-02-25 Eric Blake <ebb9@byu.net>
* libc/include/time.h (__tzrule_struct): Make offset long, since
        a 16-bit int overflows on a 12-hour offset.
        * libc/sys/linux/include/time.h: Ditto.
        * libc/time/mktime.c (mktime): Use new type of __tzrule.offset.
        * libc/time/mktm_r.c: Ditto.
        * libc/time/gettzinfo.c: Ditto.
        * libc/time/strftime.c (strftime): Fix '%x' to deal with negative
        years.  Fix '%z' to use long, not int.
2005-02-25 22:31:21 +00:00
Corinna Vinschen 6d11044c63 * fhandler.h (class fhandler_base): Declare fixup_mmap_after_fork
with additional flags parameter.  Change offset parameter to _off64_t.
	(class fhandler_disk_file): Ditto.
	(class fhandler_dev_mem): Ditto.
	* fhandler_mem.cc (fhandler_dev_mem::fixup_mmap_after_fork):
	Accomodate new parameters.
	* mmap.cc: Include ntdll.h.
	(class mmap_record): Add flags member.
	(mmap_record::mmap_record): Add flags parameter.
	(mmap_record::get_flags): New method.
	(class map): Add next_anon_addr member to store next anonymous mapping
	address suggestion.
	(map::get_next_anon_addr): New method.
	(map::set_next_anon_addr): New method.
	(mmap64): Don't align offset and length to granularity in case of
	MAP_ANONYMOUS on NT.  Check for already existing mapping only on 9x.
	Call mmap_record::mmap_record with additional flags argument.
	(fhandler_base::fixup_mmap_after_fork): Accomodate new parameters.
	(fhandler_disk_file::mmap): Use NtMapViewOfSection with
	AT_ROUND_TO_PAGE flag for anonymous mappings on NT.  If addr is NULL,
	try to map adjacent to previous mapping.
	(fhandler_disk_file::fixup_mmap_after_fork): Add flags argument.
	Change offset parameter to _off64_t.  Use NtMapViewOfSection to
	re-create anonymous mappings on NT.
	(fixup_mmaps_after_fork): Accomodate new parameters when calling
	fhandler's fixup_mmaps_after_fork function.
	* ntdll.h (AT_ROUND_TO_PAGE): New define.
2005-02-25 21:23:15 +00:00
Corinna Vinschen 99e281eb19 * Fix ChangeLog entries. 2005-02-25 11:48:02 +00:00
Corinna Vinschen a3079b47fe * mmap.cc (mmap64): Handle MAP_FIXED request on non-granulation
boundary.
2005-02-25 11:47:17 +00:00
Corinna Vinschen c68de3a262 * mmap.cc (class mmap_record): Declare new map_pages method with
address parameter.
	(mmap_record::map_pages): New method with address parameter.
	(mmap64): Evaluate access mode before checking if already existing
	mapping can be used.
	Only use existing mapping if requested access mode matches the one
	in the existing mapping.
	Add check for existing mapping for MAP_FIXED case.
2005-02-25 11:15:22 +00:00
Danny Smith 078f08b81a * include/wctype.h (wctrans) Remove _CRTIMP.
(towctrans): Likewise.
	(wctype): Likewise,
2005-02-25 08:15:46 +00:00
Danny Smith b7c201d588 * include/wctype.h: Add comment on wctrans, towctrans, wctype. 2005-02-25 01:48:38 +00:00
Danny Smith 7e9439a0eb * mingwex/wctype.c: New file.
* mingwex/wctrans.c: New file.
	* mingwex/Makefile.in (DISTFILES): Add wctype.c, wctrans.c.
	* mingwex/Makefile.in (Q8_OBJS): Add wctype.o, wctrans.o.
2005-02-25 01:43:43 +00:00
Jeff Johnston 2598f908ca Add (int) cast. 2005-02-24 19:02:35 +00:00
Jeff Johnston f4fd7b4c72 2005-02-24 Ralf Corsepious <ralf.corsepius@rtems.org>
* libm/common/s_fpclassify.c: Use __uint32_t instead of int to
        manipulate float values in integer form.
        * libm/common/sf_round.c: Ditto.
2005-02-24 18:50:06 +00:00
Jeff Johnston f2f8a9a229 2005-02-24 Ralf Corsepious <ralf.corsepius@rtems.org>
* libc/include/sys/types.h [__rtems__]: Include new
        header file machine/_types.h.
        * libc/include/machine/types.h: Ditto.
        * libc/sys/rtems/machine/_types.h: New file.
2005-02-24 18:29:31 +00:00
Joshua Daniel Franklin 45df57e8d8 Fix minor typo 2005-02-24 06:14:44 +00:00
Joshua Daniel Franklin f6dbe3872a *README: New file. 2005-02-24 05:26:33 +00:00
Joshua Daniel Franklin 4c6344923e * cygpath.cc (usage): Clarify help output to indicate acceptance
of multiple file names as arguments.
2005-02-24 04:32:45 +00:00
Corinna Vinschen 39fd43d7fa * libc/include/time.h (_timezone): Change to long also for Cygwin.
(timezone): Drop cast from definition.
2005-02-23 22:20:55 +00:00
Corinna Vinschen d0578adf88 * localtime.cc: Implement setting __tzrule's offset member using
newlib's __gettzinfo () interface.
	(__tzrule): Remove.
	(timezone): Define as long according to POSIX.
2005-02-23 22:17:28 +00:00
Corinna Vinschen ee8d935cdd * devices.cc: Regenerate. 2005-02-23 22:14:40 +00:00
Jeff Johnston 6b9a74f9e6 2005-02-23 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/time.h [!CYGWIN](_timezone): Change to long.
        (__tzrule_type, __tzinfo_type): New types.
        (__gettzinfo): New function.
        * libc/sys/linux/include/time.h: Ditto.
        * libc/time/Makefile.am: Add gettzinfo.c.
        * libc/time/Makefile.in: Regenerated.
        * libc/time/local.h: Moved __tzrule_type to time.h.
        * libc/time/mktime.c: Call __gettzinfo to reference
        __tznorth, __tzyear, and __tzrule array.
        * libc/time/mktm_r.c: Ditto.
        * libc/time/strftime.c: Ditto.
        * libc/time/tzset_r.c: Ditto.  Also remove definition
        of __tzrule which is now in gettzinfo.c.  Change _timezone
        references to not cast to time_t.
        * libc/time/gettzinfo.c: New file.
2005-02-23 19:08:58 +00:00
Corinna Vinschen 3a021c19f4 * devices.in (parsedisk): Fix typo. 2005-02-23 17:59:04 +00:00
Corinna Vinschen 6015cf9fc3 * libc/include/sys/unistd.h: Define getpeereid for Cygwin. 2005-02-23 17:42:07 +00:00
Corinna Vinschen c8b404bf5c * cygwin.din (getpeereid): Export.
* fhandler.h (class fhandler_socket): Add pipe and id members to
	exchange eid credentials for AF_LOCAL sockets.
	(eid_pipe_name): Declare new method.
	(getpeereid): Ditto.
	* fhandler_socket.cc (fhandler_socket::eid_pipe_name): New method.
	(fhandler_socket::fhandler_socket): Initialize sec_pipe.
	(fhandler_socket::connect): Exchange eid credentials with accepting
	socket process.
	(fhandler_socket::listen): Prepare eid credential transaction.
	(fhandler_socket::accept): Exchange eid credentials with connecting
	socket process.
	(fhandler_socket::close): Close eid credentials pipe if open.
	(fhandler_socket::getpeereid): New method.
	* net.cc (cygwin_getsockopt): Add SO_PEERCRED handling.
	(getpeereid): New function.
	* include/asm/socket.h (SO_PEERCRED): Define.
	* include/cygwin/socket.h (struct ucred): Define new type.
	* include/cygwin/version.h: Bump API minor version.
2005-02-23 17:39:46 +00:00
Corinna Vinschen 81d0376064 * include/sys/statvfs.h (ST_RDONLY): Define.
(ST_NOSUID): Define.
2005-02-23 16:27:54 +00:00
Corinna Vinschen a652e6d52a * cygwin.din (fstatvfs): Export.
(statvfs): Export.
	* syscalls.cc: Include sys/statvfs.h.
	(statvfs): New function.  Move statfs functionality here.
	(fstatvfs): New function.
	(statfs): Just call statvfs and copy structure.  Check validity of
	incoming struct statfs pointer.
	* include/cygwin/types.h (fsblkcnt_t): Define.
	(fsfilcnt_t): Define.
	* include/cygwin/version.h: Bump API minor version.
	* include/sys/statvfs.h: New file.
2005-02-23 13:12:43 +00:00
Corinna Vinschen e5ef74dfb2 * devices.h: Switch FH_ZERO and FH_PORT as on Linux. Add FH_FULL.
* devices.in: Add /dev/full.
	* devices.cc: Regenerate.
	* dtable.cc (build_fh_pc): Add FH_FULL.
	* fhandler.cc (fhandler_base::fstat): Set FH_FULL permission bits
	correctly.
	* fhandler_zero.cc (fhandler_dev_zero::write): Set errno to ENOSPC
	and return -1 if device is FH_FULL.
2005-02-23 12:30:31 +00:00
Nick Clifton 4add0a4e2f configure: Regenerate. 2005-02-23 10:07:06 +00:00
Christopher Faylor d1b941af91 * fhandler_disk_file.cc (fhandler_cygdrive::closedir): Return 0 when closing
cygdrive_root.
2005-02-23 02:00:48 +00:00
Corinna Vinschen 24e8fc6872 * cygwin.din (basename): Export.
(dirname): Export.
	* path.cc (basename): New function.
	(dirname): New function.
	* include/libgen.h: New file.
	* include/cygwin/version.h: Bump API minor version.
2005-02-22 19:45:41 +00:00
Corinna Vinschen 156d93af29 * select.cc (peek_pipe): Disable new pipe code until there's
a working substitute.
2005-02-22 15:39:45 +00:00
Corinna Vinschen 9ba51f6d17 * include/cygwin/version.h: Fix comment. 2005-02-22 15:35:10 +00:00
Corinna Vinschen 5e4c05da0b * libc/include/sys/unistd.h: Define fdatasync also for Cygwin. 2005-02-22 15:31:51 +00:00
Corinna Vinschen a62f6b806e * cygwin.din (fdatasync): Export.
* fhandler.cc (fhandler_base::fsync): Return with EINVAL if no
	handle is available.
	* syscalls.cc (fdatasync): Create export alias to fsync.
	* include/cygwin/version.h: Bump API minor version.
2005-02-22 15:30:09 +00:00
Nick Clifton 2f707783a2 Allow darwin targeted ports to build tk, itcl and libgui. 2005-02-22 09:16:10 +00:00
Eric Botcazou 2caa45c45a PR libgcj/10353
* configure.in (noconfigdirs) <sparc-*-solaris2.[0-6]>: Add libgcj.
	* configure: Regenerate.
2005-02-21 12:29:05 +00:00
Corinna Vinschen 4e5a3fa5e2 * fhandler.h (fhandler_base::fstat_helper): Declare with additional
dwVolumeSerialNumber argument.  Drop default values for last three
	arguments.
	* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Pass
	dwVolumeSerialNumber from GetFileInformationByHandle to fstat_helper.
	(fhandler_base::fstat_by_name): Pass pc.volser () to fstat_helper.
	Accomodate dropping default values for last three arguments of
	fstat_helper.
	(fhandler_base::fstat_helper): Add dwVolumeSerialNumber argument.
	Use for st_dev member unless 0 in which case pc.volser () is used.
2005-02-20 16:14:53 +00:00
Alan Modra f46ddb818a include/
* xtensa-isa-internal.h (xtensa_length_decode_fn): Warning fix.
	* xtensa-isa.h (xtensa_insnbuf_to_chars): Likewise.
	(xtensa_insnbuf_from_chars, xtensa_isa_length_from_chars): Likewise.
include/coff/
	* xcoff.h (struct xcoff_loader_info): Warning fix.
bfd/
	* bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
	* coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
	* coff-rs6000.c (xcoff_write_armap_big): Warning fixes.  Remove
	useless assignments.
	(xcoff_write_archive_contents_big): Likewise.
	(_bfd_xcoff_put_ldsymbol_name): Likewise.
	* coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
	* coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
	* cofflink.c (process_embedded_commands): Warning fixes.
	* cpu-arm.c: Delete unnecessary prototypes.  Convert to C90.
	Warning fixes.
	* dwarf2.c: Warning fixes.
	* elf-bfd.h: Likewise.
	* elf-eh-frame.c: Likewise.
	* elf-strtab.c: Likewise.
	* elf.c: Likewise.
	* elf32-m68k.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf32-sh-symbian.c: Likewise.
	* elf32-sh.c: Delete unnecessary prototypes.  Warning fixes.
	* elf64-sh64.c: Likewise.
	* peicode.h: Likewise.
	* elf64-mmix.c: Warning fixes.
	* elfcode.h: Likewise.
	* elfxx-mips.c: Likewise.
	* libbfd-in.h: Likewise.
	* libbfd.c: Likewise.
	* mach-o.c: Likewise.
	* merge.c: Likewise.
	* mmo.c: Likewise.
	* opncls.c: Likewise.
	* pef.c: Likewise.
	* srec.c: Likewise.
	* vms-hdr.c: Likewise.
	* vms-tir.c: Likewise.
	* xtensa-isa.c: Likewise.
	* xtensa-modules.c: Likewise.
	* xsym.c: Likewise.
	(pstrcmp): Use correct choice of string lengths.  Fix return value.
	(bfd_sym_module_name): Correct string length.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
2005-02-20 14:59:05 +00:00
Corinna Vinschen 4944ca2f09 * autoload.cc (FindFirstVolumeA): Add.
(FindNextVolumeA): Add.
	(FindVolumeClose): Add.
	(GetVolumePathNamesForVolumeNameA): Add.
	* fhandler.h (class fhandler_base): Declare new method fsync.
	* fhandler.cc (fhandler_base::fsync): New method.
	* syscalls.cc (fsync): Move functionality into fhandler method fsync.
	Just call this method from here.
	(sync_worker): New static function.
	(sync): Fill with life for NT systems.
	* wincap.h (wincaps::has_guid_volumes): New element.
	* wincap.cc: Implement above element throughout.
2005-02-20 13:28:23 +00:00
Corinna Vinschen 2b09be25a3 * fhandler.h (enum query_state): Add query_write_attributes state.
(fhandler_base::status.query_open): Add a bit to make room for more
	states.
	(class fhandler_base): Declare new method utimes.
	(class fhandler_socket): Ditto.
	(class fhandler_disk_file): Ditto.
	(fhandler_disk_file::fhandler_disk_file): Add constructor with
	path_conv parameter.
	* fhandler.cc (fhandler_base::open): Add query_write_attributes
	handling.
	(fhandler_base::utimes): New method.
	* fhandler_disk_file.cc (fhandler_disk_file::link): Simplify.
	Open file with query_write_attributes instead of query_write_control.
	(fhandler_disk_file::utimes): New method.
	(fhandler_disk_file::fhandler_disk_file): Add constructor with
	path_conv parameter setting pc member immediately.
	* fhandler_socket.cc (fhandler_socket::fchmod): Use new
	fhandler_disk_file constructor.
	(fhandler_socket::fchown): Ditto.
	(fhandler_socket::facl): Ditto.
	(fhandler_socket::link): Ditto.
	(fhandler_socket::utimes): New method.
	* times.cc: Include dtable.h.
	(timeval_to_filetime): Make non-static.
	(utimes): Move functionality into fhandler method utimes. Just call
	this method from here.
	* winsup.h: Simplify declarations of time helper functions.
	(timeval_to_filetime): Add extern declaration.
2005-02-20 11:44:32 +00:00
Christopher Faylor 731028b326 copyright 2005-02-20 04:25:33 +00:00
Corinna Vinschen 0d75ce965c * fhandler.h (class fhandler_base): Declare new method link.
(class fhandler_socket): Ditto.
	(class fhandler_disk_file): Ditto.
	* fhandler.cc (fhandler_base::open): Add FILE_WRITE_ATTRIBUTES
	to query_write_control access flags.
	(fhandler_base::link): New method.
	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Don't try to
	open with O_WRONLY since query_write_control includes
	FILE_WRITE_ATTRIBUTES.
	(fhandler_disk_file::fchown): Ditto.
	(fhandler_disk_file::facl): Ditto.
	(fhandler_disk_file::link): New method.  Touch st_ctime on successful
	link.
	* fhandler_socket.cc (fhandler_socket::link): New method.
	* syscalls.cc (link): Move functionality into fhandler method link.
	Just call this method from here.
2005-02-19 21:53:36 +00:00
Corinna Vinschen c2d0b9d89a * fhandler.h (class fhandler_socket): Declare new methods fchown,
fchmod and facl.
	* fhandler_socket.cc (fhandler_socket::fstat): Handle AF_LOCAL
	sockets.
	(fhandler_socket::fchmod): New method.
	(fhandler_socket::fchown): New method.
	(fhandler_socket::facl): New method.
2005-02-19 20:03:18 +00:00
Corinna Vinschen 2d7606a594 * localtime.cc: Temporary implementation of setting __tzrule's offset
member to be used by strftime.
	(__tzrule): New global variable.
	(tzparse): Set __tzrule's offset member appropriately.
2005-02-19 19:58:38 +00:00