Commit Graph

7040 Commits

Author SHA1 Message Date
Christopher Faylor 9bc36097c9 * pinfo.cc (proc_waiter): Zero wait_thread in child to avoid races with process
termination.
* cygthread.cc (cygthread::terminate): Clumsily detect when h has gone away and
attempt no further action.
2004-12-22 16:59:03 +00:00
Christopher Faylor 9c0d960d7f * cygthread.h (cygthread::release): Just declare here.
* cygthread.cc (cygthread::release): Define here.  Use InterlockedExchange to
set inuse or suffer potential races.
(cygthread::terminate): Use release().
2004-12-22 16:19:27 +00:00
Nick Clifton 1f490e5712 Add support for the new R_AVR_LDI, R_AVR_6 and R_AVR_6_ADIW relocs for the
LDI, ADIW/SBIW and LDD/STD instructions.
2004-12-22 14:25:37 +00:00
Corinna Vinschen 4b84574c07 * fhandler_process.cpp (format_process_status): Use tabs in formatting
instead of spaces.
2004-12-22 11:35:29 +00:00
Corinna Vinschen 13d991bbea * path.cc (set_normalized_path): Allow empty pathnames. 2004-12-22 11:31:30 +00:00
Christopher Faylor e85c18a883 * spawn.cc (spawn_guts): Force parent to forget about P_DETACH'ed process. 2004-12-21 18:45:01 +00:00
Christopher Faylor e0520ec4b7 * path.cc (normalize_win32_path): Remove unneeded check for dots. 2004-12-20 17:55:22 +00:00
Christopher Faylor 8d060512a6 * path.cc (normalize_posix_path): Remove unneeded check for dots.
(path_conv::set_normalized_path): Strip trailing dots, similarly to what had
previously been done for the win32 path.
2004-12-20 16:31:18 +00:00
Danny Smith 7ffd6c6f17 * include/wchar.h (wcsdup): Correct prototype.
* include/string.h (wcsdup): Correct prototype.
2004-12-20 00:03:06 +00:00
Christopher Faylor b861c0a383 * path.cc (normalize_win32_path): Make third arg pass-by reference. Reorganize
slightly to eliminate extra variables.
(normalize_posix_path): Ditto.
(path_conv::check): Reflect change in arguments.
(mount_info::conv_to_posix_path): Ditto.
(mount_info::add_item): Ditto.
2004-12-19 03:27:09 +00:00
Christopher Faylor 5524af6e9b * child_info.h (CURR_CHILD_INFO_MAGIC): Use updated value.
* path.cc (path_conv::check): Check the output Win32 path for trailing spaces
and dots, not the input path.  Disallow all use of foo./bar since consistently
getting this right is time consuming.  Remove strange test for "unc\" since no
one seems to know what it's for.
2004-12-19 02:40:40 +00:00
Christopher Faylor bbe009b770 revert erroneous checkin 2004-12-18 16:41:27 +00:00
Christopher Faylor b25e8b65c2 * fhandler_proc.cc (proc_listing): Add entry for "self".
(proc_fhandlers): Add entry for "self".
* fhandler_process.cc (fhandler_process::fstate): Handle "self".
(fhandler_process::open): Handle "self".
2004-12-18 16:37:44 +00:00
Jeff Johnston a9c42bde0b 2004-12-17 Jeff Johnston <jjohnstn@redhat.com>
* NEWS: Update with 1.13.0 info.
        * README: Ditto.
        * acinclude.m4: Change version number to 1.13.0.
        * aclocal.m4: Regenerated.
        * configure: Ditto.
        * doc/aclocal.m4: Ditto.
        * doc/configure: Ditto.
        * iconvdata/aclocal.m4: Ditto.
        * iconvdata/configure: Ditto.
        * libc/*/aclocal.m4: Ditto.
        * libc/*/configure: Ditto.
        * libc/libc.texinfo: Ditto.
        * libm/*/aclocal.m4: Ditto.
        * libm/*/configure: Ditto.
        * libm/libm.texinfo: Ditto.
        * libc/sys/linux/shared.ld: Add VERS_1.13.
2004-12-17 22:48:16 +00:00
Jeff Johnston d8ae996c41 2004-12-17 Christian Groessler <chris@groessler.org>
* libc/machine/z8k/memcmp.S: New file.
        * libc/machine/z8k/memcpy.S: Ditto.
        * libc/machine/z8k/memmove.S: Ditto.
        * libc/machine/z8k/memset.S: Ditto.
        * libc/machine/z8k/Makefile.am: Add new files.
        * libc/machine/z8k/Makefile.in: Regenerated.
        * libc/machine/z8k/setjmp.S: Fix indirect register usage in Z8002
        part.  Implement Z8002 stdcall version.
2004-12-17 20:17:13 +00:00
Christopher Faylor 8232f2e050 * sigproc.cc (proc_subproc): Fix long-standing problem. Only wait for "all
processes" if pid == -1 -- not just if pid is negative.
(proc_can_be_signalled): Fix another long-standing problem.  Set correct errno
when detecting an exited process.
2004-12-17 17:42:03 +00:00
Joern Rennecke 0d549859a5 2004-12-16 Andrew Stubbs <andrew.stubbs@st.com>
* configure.in (sh64-*-*): Reenable gprof.
	* configure: Regenerate.
2004-12-16 19:51:28 +00:00
Richard Sandiford 1df0c1dde7 include/elf/
* v850.h (R_V850_LO16_SPLIT_OFFSET): New reloc.

bfd/
	* reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
	* elf32-v850.c (v850_elf_howto_table): Add entry for
	R_V850_LO16_SPLIT_OFFSET.
	(v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
	(v850_elf_perform_lo16_relocation): New function, extracted from...
	(v850_elf_perform_relocation): ...here.  Use it to handle
	R_V850_LO16_SPLIT_OFFSET.
	(v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
	R_V850_LO16_SPLIT_OFFSET.
	* libbfd.h, bfd-in2.h: Regenerate.

gas/
	* config/tc-v850.c (handle_lo16): New function.
	(v850_reloc_prefix): Use it to check lo().
	(md_assemble, md_apply_fix3): Handle BFD_RELOC_V850_LO16_SPLIT_OFFSET.

gas/testsuite/
	* gas/v850/split-lo16.{s,d}: New test.
	* gas/v850/v850.exp: Run it.

ld/testsuite/
	* ld-v850: New directory.
2004-12-16 16:55:53 +00:00
Corinna Vinschen a435749dc2 * fhandler_console.cc (get_win32_attr): Avoid inappropriate intensity
interchanging that used to render reverse output unreadable when
	non-reversed text is bright.
2004-12-16 13:19:08 +00:00
Corinna Vinschen 2ef89b220a * cygwin.din: Add utmpx symbols.
* syscalls.cc: Include utmpx.h.  Implement utmpx functions as stubs
	to utmp functions.
	(copy_ut_to_utx): New static function.
	(pututline): Change from void to struct utmp * as on Linux.
	(setutxent): New function.
	(endutxent): New function.
	(getutxent): New function.
	(getutxid): New function.
	(getutxline): New function.
	(pututxline): New function.
	* include/utmpx.h: New file.
	* include/cygwin/utmp.h: New file.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/utmp.h: Include cygwin/utmp.h.  Move stuff common with
	utmpx functionality there.
	(pututline): Declare struct utmp *.
2004-12-15 17:29:01 +00:00
Hans-Peter Nilsson 4931fc2b3a * callback.h (CB_SYS_truncate, CB_SYS_ftruncate): New macros. 2004-12-15 01:24:15 +00:00
Corinna Vinschen dad3ae73b3 * tty.cc (tty_list::terminate): Guard releasing the tty with tty_mutex.
(tty::init): Set master_pid to 0.
2004-12-14 17:19:22 +00:00
Corinna Vinschen 988566db0c * fhandler_console.cc (read): Consider offset within scrolling
region of the console window.
2004-12-14 12:09:51 +00:00
Jeff Johnston 82673116e1 2004-12-13 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/fread.c (fread): For unbuffered I/O, attempt
        a low-level read if we don't get the full amount of bytes so
        EOF or error flags will be set.
2004-12-13 19:42:16 +00:00
Corinna Vinschen c6ad91f3f8 * cygheap.h (cwdstuff::get_drive): Release cwd_lock. 2004-12-13 19:33:30 +00:00
Hans-Peter Nilsson bf15c75b20 Correct attribution last changes 2004-12-13 00:43:59 +00:00
Hans-Peter Nilsson 4e96a0a0a1 * callback.h (CB_SYS_rename): New macro. 2004-12-13 00:42:49 +00:00
Hans-Peter Nilsson 716f334bce * callback.h (struct host_callback_struct): New member lstat.
(CB_SYS_lstat): New macro.
2004-12-13 00:35:29 +00:00
Bas van Gompel 3020ba83ce * fhandler.cc (fhandler_base::puts_readahead): Fix end-condition. 2004-12-12 02:15:34 +00:00
DJ Delorie c546950745 merge from gcc 2004-12-10 22:04:33 +00:00
Corinna Vinschen aee05403d1 * errno.cc (errmap): Map ERROR_INVALID_ADDRESS to EINVAL instead of
EOVERFLOW.
2004-12-10 17:43:00 +00:00
Christopher Faylor 804cd111b4 * include/sys/strace.h: Don't output paranoid_printf by default. 2004-12-10 16:25:35 +00:00
Jim Blandy e83a0e6527 * MAINTAINERS: List 'depcomp' as part of automake. 2004-12-09 21:59:14 +00:00
Jeff Johnston 0082d4cf57 2004-12-09 Alex Mogilnikov <alx@intellectronika.ru>
* libc/time/tzset_r (_tzset_r): Properly skip over
        '/' when it is detected.
2004-12-09 21:36:48 +00:00
Christopher Faylor fc2eba361c * lib/libcmain.c (main): Properly deal with quoted first argument. 2004-12-09 21:28:32 +00:00
Ian Lance Taylor 23b9802aa0 * mips.h (CPU_RM9000): Define.
(OPCODE_IS_MEMBER): Handle CPU_RM9000.
2004-12-09 06:13:44 +00:00
Ian Lance Taylor 55059a1f7d * mips.h (E_MIPS_MACH_9000): Define. 2004-12-09 06:02:45 +00:00
Danny Smith 8bbdc64198 * include/sqlext.h (SQL_INTERVAL_*): Correct macros.
Reported by Eric Sharkey <sharkey at netrics dot com>
2004-12-09 02:33:20 +00:00
David Edelsohn aea52d22aa * Makefile.def (flags_to_pass): Add PICFLAG_FOR_TARGET.
* Makefile.tpl (EXTRA_HOST_FLAGS): Add PICFLAG.
	(EXTRA_TARGET_FLAGS): Add PICFLAG.
	* Makefile.in: Regenerate.
2004-12-08 20:29:58 +00:00
DJ Delorie da3e88ae5b * Makefile.tpl: Generate normal dependencies if the LHS module is
not bootstrapped.
* Makefile.in: Regenerate.
2004-12-08 18:57:27 +00:00
Jeff Johnston 3b54b74f3a 2004-12-08 Alex Mogilnikov <alx@intellectronika.ru>
* libc/time/tzset_r (_tzset_r): Fix loop.
2004-12-08 18:12:28 +00:00
Jeff Johnston 4b30e15471 2004-12-08 Alex Mogilnikov <alx@intellectronika.ru>
* libc/time/mktm_r (_mktm_r): Fix overflow calculation for
        m_day.
        (__tzcalc_limits): Fix reference to month array to be zero-based.
2004-12-08 17:54:38 +00:00
Jeff Johnston 465eab2eb4 2004-12-07 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/sys/unistd.h: Add prototypes for ftruncate, truncate,
        and usleep.
2004-12-07 18:54:28 +00:00
Danny Smith 91ce86e773 * include/winnt.h (TOKEN_INFORMATION_CLASS): Add
TokenGroupsAndPrivileges, TokenSessionReference,
	TokenSandBoxInert, TokenAuditPolicy, TokenOrigin.
	Reformat.
	(SID_NAME_USE): Add SidTypeComputer.  Reformat.
	Thanks to Gabriel Linder <mingwlinder@users.sourceforge.net>
2004-12-07 07:15:26 +00:00
Christopher Faylor a8dead4476 * pinfo.h (proc_pipe::*): Delete class.
* pinfo.cc (proc_pipe::*): Ditto.
2004-12-06 19:20:24 +00:00
Christopher Faylor 8c43a9f82e * fork.cc (fork_parent): Reinstate "childhProc" protection. Don't close
hProcess handle here since it is used to ensure that a new process isn't
created with the old pid after the old pid exits.
* spawn.cc (spawn_guts): Ditto.
* pinfo.cc (proc_waiter): Don't send any signals if we've execed since this
process doesn't officially exist.
* pinfo.h (pinfo::pid_handle): Eliminate.  Just use hProc.
* sigproc.cc (sig_send): Don't send any signals if our sendsig doesn't exist.
That's a sign that we are execing.
(remove_proc): Eliminate pid_handle close.
2004-12-06 00:29:41 +00:00
Christopher Faylor 013f043fff fix typo 2004-12-05 21:39:47 +00:00
Christopher Faylor f181da2707 * cygthread.cc (cygthread::terminate_thread): Make public.
* pinfo.h (pinfo::wait_thread): New element.
* pinfo.cc (pinfo::wait): Store "handle" to started thread in pinfo.
* sigproc.cc (proc_terminate): Kill any threads waiting for a process pipe.
2004-12-05 21:29:37 +00:00
Christopher Faylor 54dd79bb44 * sigproc.cc (mychild): Reimplement as list scan.
(proc_subproc): Don't mess with pinfo if it's myself.
* child_info.h (child_info_types): Label enum for _PROC constants.
(child_info::child_info): New constructor.
(child_info::~child_info): New destructor.
(child_info::sync): Declare new function.
(child_info_fork::child_info_fork): New constructor.
(child_info_spawn::child_info_spawn): Remove old constructor.
(child_info_spawn::child_info_spawn): New constructor.
* dcrt0.cc (dll_crt0_0): Use correct sizeof when doing sanity check on passed
in child_info.  Signal readiness to parent when not forking (and not spawning).
* fork.cc (sync_with_child): Delete.
(resume_child): Remove extra argument.
(sync_with_parent): Use child_info method to sync with parent.
(fork_child): Don't close fork_info->subproc_ready since that is now handled by
the destructor.
(fork_parent): Remove subproc_ready stuff.  Use child_info sync method for
waiting..  Set start time here for child.  Rename "forked" to "child".
(fork): Check ch.subproc_ready for validity here.
* pinfo.h (_pinfo::exec_sendsig): Temp storage for exec stub which may be
staying around to handle non-cygwin captive process.
(_pinfo::exec_dwProcessId): Ditto.
(_pinfo::_lock): Renamed from lock.
(_pinfo::lock): New method.
(_pinfo::unlock): Ditto.
(_pinfo::initialize_lock): Ditto.
* pinfo.cc (set_myself): Use initialize_lock method to initialize myself lock.
Set "exec" fields in _pinfo to zero to indicate that we've started
successfully.  Set start time here when appropriate.
(_pinfo::commune_send): Use pinfo lock/unlock methods.
(proc_waiter): Remove special case for non-cywin processes.  Reinstitute
handling for PID_NOCLDSTOP.
* sigproc.cc (proc_subproc): Set proper EAGAIN errno when process table is
filled.
(sig_send): Use exec_* fields from _pinfo for sending signals if the the _pinfo
sendsig never materializes.
(child_info::child_info): New constructor, renamed from init_child_info.
Zeroes child_info structure and sets appropriate fields in structure based on
chtype.
(child_info::~child_info): New destructor.  Closes subproc_ready if it exists.
(child_info_fork::child_info_fork): New constructor.
(child_info_spawn::child_info_spawn): New constructor.
(child_info::ready): New function.  Signals parent when child is ready.
(child_info::sync): New function.  Wait for child to signal us or process to
die.
(remove_proc): Remove closing of hProcess since this should now be handled
shortly after process creation.
* spawn.cc (spawn_guts): Use child_info_spawn constructor rather than
init_child_info.  Save exec_sendsig and exec_dwProcessId in execing _pinfo.
Rely on child_info constructor to properly set parent_wr_proc_pipe in ciresrv.
Revert to previous determination on whether to start a process in suspended
mode.  Remove reparenting stuff.  Just keep a stub around if starting a
non-cygwin process.
2004-12-05 19:41:26 +00:00
Bas van Gompel d54b79d351 * fhandler.cc (fhandler_base::read): Remove superfluous check in
__small_printf format for strace.
2004-12-05 07:28:27 +00:00