Corinna Vinschen [Wed, 26 Jan 2005 13:07:48 +0000 (13:07 +0000)]
* syscalls.cc (setpriority): Implement PRIO_PGRP, PRIO_USER and
setting priority in other Cygwin processes.
(getpriority): Implement PRIO_PGRP, PRIO_USER and getting nice value
from other processes.
* pinfo.h (pinfo::init): Make third parameter non-optional and propagate change
throughout.
* pinfo.cc (set_myself): Pass INVALID_HANDLE_POINTER if h is NULL.
(pinfo::init): Make third parameter non-optional. Eliminate use of PID_EXECED
as an argument. Put setting of handle back inside loop but reorganize to try
to open it only when necessary.
Corinna Vinschen [Tue, 25 Jan 2005 22:45:11 +0000 (22:45 +0000)]
* cygwin.din: Export getpriority and setpriority.
* fork.cc (fork_parent): Copy parent's nice value into child.
* spawn.cc (spawn_guts): Ditto.
* miscfuncs.cc (winprio_to_nice): New function.
(nice_to_winprio): Ditto.
* pinfo.cc (pinfo_init): If parent is not a Cygwin process, set
default nice value according to current Win32 priority class.
* pinfo.h (class _pinfo): Add nice member.
* syscalls.cc (setpriority): New function, only implementing
PRIO_PROCESS for now.
(getpriority): Ditto.
(nice): Just call setpriority.
* wincap.h (wincaps::has_extended_priority_class): New element.
* wincap.cc: Implement above element throughout.
* winsup.h: Add prototypes for winprio_to_nice and nice_to_winprio.
* include/limits.h (NZERO): New define.
* include/cygwin/types.h (id_t): New datatype.
* include/cygwin/version.h: Bump API minor version.
* include/sys/resource.h: Add PRIO_XXX defines and prototypes for
getpriority and setpriority.
Jeff Johnston [Mon, 24 Jan 2005 18:46:09 +0000 (18:46 +0000)]
2005-01-24 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/string.h: Remove Linux-specific declaration of
strsignal and add #include <sys/string.h>.
* libc/include/sys/string.h: New file.
* libc/include/sys/linux/sys/string.h: New file with strsignal
declaration deleted above.
* spawn.cc (spawn_guts): Perform same "cd" as in pinfo::exit below to make sure
that a stub process does not keep the current working directory busy after the
"execed" process has exited.
* pinfo.cc (pinfo::init): Move everything but the MapViewOfFileEx out of the
loop since trying multiple times to call CreateFileMapping doesn't make much
sense. Try to structure the loop a little better so that exiting with a break
does the right thing.
(pinfo::release): Release shared memory area if it exists and close handle if
it exists.
* how-programming.texinfo: Add details about building a debugging version of the DLL.
* how-using.texinfo: Correct rxvt README location.
* install.texinfo: Add mount -m note to uninstall instructions.
* pinfo.cc (pinfo::maybe_set_exit_code_from_windows): Make sure that process
has exited before getting an error code.
(pinfo::exit): "cd" to innocuous location before exiting to make sure that
process does not keep the current working directory busy while it is in the
process of really exiting.
Fred Fish [Fri, 21 Jan 2005 19:42:08 +0000 (19:42 +0000)]
2005-01-21 Fred Fish <fnf@specifixinc.com>
* mips.h: Change INSN_ALIAS to INSN2_ALIAS.
Change INSN_WRITE_MDMX_ACC to INSN2_WRITE_MDMX_ACC.
Change INSN_READ_MDMX_ACC to INSN2_READ_MDMX_ACC.
Jeff Johnston [Thu, 20 Jan 2005 19:56:27 +0000 (19:56 +0000)]
2005-01-20 Jeff Johnston <jjohnstn@redhat.com>
* libc/time/strftime.c (strftime): Change %r and %x to be compliant
to POSIX standard for "C" locale. Allow %E and %O modifiers
to be ignored as long as they precede valid specifiers according
to POSIX.
Fred Fish [Wed, 19 Jan 2005 23:29:12 +0000 (23:29 +0000)]
2005-01-19 Fred Fish <fnf@specifixinc.com>
* mips.h (struct mips_opcode): Add new pinfo2 member.
(INSN_ALIAS): New define for opcode table entries that are
specific instances of another entry, such as 'move' for an 'or'
with a zero operand.
(INSN_READ_MDMX_ACC): Redefine from 0 to 0x2.
(INSN_WRITE_MDMX_ACC): Redefine from 0 to 0x4.
Jeff Johnston [Tue, 18 Jan 2005 19:27:44 +0000 (19:27 +0000)]
2005-01-18 Hans-Peter Nilsson <hp@axis.com>
* libnosys/warning.h (link_warning) [HAVE_GNU_LD and HAVE_ELF]:
Prefix symbol in section name with __SYMBOL_PREFIX. Do not use
__make_section_unallocated. Mark magic variable as used.
Jeff Johnston [Tue, 18 Jan 2005 19:23:36 +0000 (19:23 +0000)]
2005-01-18 Hans-Peter Nilsson <hp@axis.com>
* libnosys/configure.in (libc_cv_asm_previous_directive): Set
cache-id variable.
(libc_cv_asm_popsection_directive): Ditto.
(libc_cv_section_attributes): Ditto.
(libc_symbol_prefix): Rename from libc_dollar_prefix. Check for
"_" as well, and set __SYMBOL_PREFIX accordingly.
* libnosys/configure: Regenerate.
Corinna Vinschen [Tue, 18 Jan 2005 13:00:18 +0000 (13:00 +0000)]
* autoload.cc (CoInitialize): Remove.
(CoUninitialize): Remove.
(CoCreateInstance): Remove.
(CoTaskMemFree): Add.
(SHGetDesktopFolder): Add.
* path.cc (shortcut_header): Remove.
(shortcut_initalized): Remove.
(GUID_shortcut): New static GUID.
(struct win_shortcut_hdr): New struct describing Windows shortcut
header structure.
(symlink_worker): Rewrite creating Windows shortcuts. Create
ITEMIDLIST if target exists. Only write once.
(cmp_shortcut_header): Use win_shortcut_hdr structure for comparison.
(check_shortcut): Rewrite to read only once from file. Allow skipping
an ITIMIDLIST in the file.
* pinfo.h (maybe_set_exit_code_from_windows): Renamed from set_exit_state.
* pinfo.cc (pinfo::exit): Use renamed function.
(proc_waiter): Ditto. Make a copy of input argument to avoid problems when
procs array is shuffled. Flag when copy is made so that remove_proc knows when
it is safe to reshuffle.
* sigproc.cc (proc_terminate): Don't flag process_state as PID_EXITED.
(remove_proc): Wait for waiter to finish copying pinfo element before moving it
(an actual wait should be an extremely rare event).
* ps.cc (main): Eliminate use of PID_ZOMBIE.
* strace.cc (main): Recognize new option for displaying hex value of strace
type.
(handle_output_debug_string): Prepend output with hex value of strace message
if -H is specified.
* init.cc (dll_entry): Remove unused extern.
* include/sys/cygwin.h: Remove PID_ZOMBIE.
* pinfo.h: Rename EXITCODE_* defines.
(pinfo::set_exit_state): Remove parameter.
* pinfo.cc (set_exit_state): Remove parameter. Reverse sense of test so that
exitcode is checked for having been set rather than not having been set. Set
flag when exitcode has been established. Don't set PID_STATE here.
(pinfo::init): Remove exitcode initialization.
(pinfo::exit): Reflect change in EXITCODE_* naming. Set flag when exitcode has
been established. Reflect change in arguments to set_process_state.
(proc_waiter): Reflect change in arguments to set_process_state. Set
process_state here and only here.
* fhandler_process.cc (fhandler_process::fill_filebuf): Reflect removal of
PID_ZOMBIE define.
(format_process_stat): Ditto.
(format_process_status): Ditto.
* sigproc.cc (pid_exists): Ditto.
(stopped_or_terminated): Ditto. Make sure that only low-order 16 bits of
exitcode are used.
* spawn.cc (spawn_guts): Reflect change in EXITCODE_* naming.
Jeff Johnston [Sat, 15 Jan 2005 00:17:51 +0000 (00:17 +0000)]
2005-01-14 Hans-Peter Nilsson <hp@axis.com>
* libnosys/warning.h (__make_section_unallocated)
[HAVE_ASM_PREVIOUS_DIRECTIVE, HAVE_ASM_POPSECTION_DIRECTIVE]: Use "\n"
instead of ";" to delimit assembly lines.
Corinna Vinschen [Fri, 14 Jan 2005 22:03:40 +0000 (22:03 +0000)]
* fhandler_disk_file.cc (fhandler_disk_file::facl): Pretend successful
SETACL if no acls are available.
* fhandler.cc (fhandler_base::facl): Implement to return sensible
values on GETACL and GETACLCNT. Pretend successful SETACL.
* fhandler_virtual.cc (fhandler_virtual::facl): Ditto.
Corinna Vinschen [Thu, 13 Jan 2005 22:56:20 +0000 (22:56 +0000)]
* fhandler.h (fhandler_disk_file::touch_ctime): Declare.
* fhandler_disk_file.cc (fhandler_disk_file::touch_ctime): New method
to set file's ctime.
(fhandler_disk_file::fchmod): Try opening file for writing first.
Set file's ctime on success.
(fhandler_disk_file::fchown): Ditto.
(fhandler_disk_file::facl): Ditto.
Corinna Vinschen [Thu, 13 Jan 2005 22:18:57 +0000 (22:18 +0000)]
* pinfo.cc (pinfo::exit): Don't access self after releasing it.
* path.h (path_conv::path_conv): Fill path with native device
name in case of device argument.
* init.cc (dll_entry): Nuke attempt to set exit code since parent will use
windows exit code if needed.
* pinfo.cc (pinfo::exit): Move release() here to minimize pid creation race
(suggested by Pierre Humblet).
Reorganize header file inclusion throughout so that cygerrno.h comes first.
* fhandler.h (select_record::thread_errno): Save any encountered errno here.
(select_record::set_select_errno): New function.
(select_record::saw_error): New function.
(select_record::select_record): Initialize thread_errno to zero.
* select.cc (set_handle_or_return_if_not_open): Set thread_errno on failure.
(select_stuff::wait): Record errno for later resurrection in calling thread.
(peek_serial): Ditto.
Pierre Humblet [Tue, 11 Jan 2005 23:03:24 +0000 (23:03 +0000)]
2005-01-11 Pierre Humblet <pierre.humblet@ieee.org>
* mkpasswd.c (print_win_error): Transform into macro.
(_print_win_error): Upgrade former print_win_error by
printing the line.
(current_user): Call _print_win_error.
(enum_users): Print name in case of lookup failure.
(enum_local_groups): Ditto.
* pinfo.h (_pinfo::set_exit_state): Declare new function.
(pinfo::exit): Move here from _pinfo::exit.
* sigproc.cc (child_info::sync): Use new function to set exitcode and
process_state.
* pinfo.cc (_pinfo::exit): Ditto.
(proc_waiter): Ditto.
(_pinfo::set_exit_state): Define new function.
(_pinfo::dup_proc_pipe): Close handle when there is no parent process around to
care about the exit value.
* dcrt0.cc (dll_crt0_0): Move subproc_ready synchronization later to make sure
that myself is still mapped in parent.
(do_exit): Reflect movement to pinfo::exit.
(__api_fatal): Ditto.
* exceptions.cc (signal_exit): Ditto.
* errno.cc (errmap): Map PROC_NOT_FOUND.
* init.cc (dll_entry): Release myself before exiting.
* sigproc.cc (proc_can_be_signalled): Set errno appropriately.
(sig_send): Ditto. Also remove ill-advised test for !myself->sendsig since
this is an indication of a process which is still initializating -- it is not
an error.
(child_info::sync): Don't set exitcode here. Assume that will happen in
proc_waiter, if necessary.
* spawn.cc (spawn_guts): Delay "wait_for_myself" logic until later. Don't wait
at all if the process has already exited. Reflect movement to pinfo::exit.
Andreas Schwab [Mon, 10 Jan 2005 09:54:50 +0000 (09:54 +0000)]
binutils/:
* configure.in: Don't define SKIP_ZEROES.
* configure: Regenerate.
* objdump.c (disassemble_data): Set skip_zeroes and
skip_zeroes_at_end in disasm_info to defaults.
(DEFAULT_SKIP_ZEROES): Rename from SKIP_ZEROES and always define.
(DEFAULT_SKIP_ZEROES_AT_END): Rename from SKIP_ZEROES_AT_END and
always define.
(disassemble_bytes): Use skip_zeroes and skip_zeroes_at_end from
objdump_disasm_info.
include/:
* dis-asm.h (struct disassemble_info): Add skip_zeroes and
skip_zeroes_at_end.
opcodes/:
* disassemble.c (disassemble_init_for_target) <case
bfd_arch_ia64>: Set skip_zeroes to 16.
<case bfd_arch_tic4x>: Set skip_zeroes to 32.
Jeff Johnston [Thu, 6 Jan 2005 23:31:56 +0000 (23:31 +0000)]
2005-01-06 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/strtod.c (_strtod_r): Add NaN support.
* (strtof): Ditto.
* libc/stdio/vfscanf.c (__svfscanf_r): Ditto.
* Makefile.am (MATHOBJS_IN_LIBC): Add s_nan and sf_nan
functions for use by strtod and strtof.
* Makefile.in: Regenerated.
* dcrt0.cc (multiple_cygwin_problem): Reorganize error message to not always
talk about a "version" when it's not a version.
(dll_crt0_0): Change info passed to multiple_cygwin_problem to be a little more
precise.
* shared.cc (user_shared_initialize): Ditto.
(shared_info::initialize): Ditto.