Corinna Vinschen [Fri, 11 Feb 2005 15:37:26 +0000 (15:37 +0000)]
* fhandler.cc (fhandler_base::raw_write): Mark as changed on
successful write.
* fhandler.h (fhandler_base::status_flags): Add 'has_changed' flag.
* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Call
fhandler_disk_file's own open and close instead of open_fs and
close_fs. Mark as changed on success.
(fhandler_disk_file::fchown): Ditto.
(fhandler_disk_file::facl): Ditto.
(fhandler_disk_file::ftruncate): Ditto.
(fhandler_base::open_fs): Mark as changed when O_TRUNC flag on existing
file is set.
(fhandler_disk_file::close): Set st_ctime if has_changed flag is set.
* cygthread.cc (cygthread::release): Reset ev here if it exists.
(cygthread::terminate_thread): Eliminat racy code which reset ev and
thread_sync. Remove a few nonsensical inuse checks. Exit at the bottom.
(cygthread::detach): Rewrite to again try to ensure that we don't say we're
signalled when we are not signalled.
* fhandler.cc (fhandler_base::raw_read): Revert to signalling read success
quickly.
* pipe.cc (fhandler_pipe::close): Use base method to close handle.
* sigproc.h (WAIT_SIG_PRIORITY): Just trundle along at normal priority to allow
the pipe thread to do its thing if possible.
* pinfo.h (pinfo::zap_cwd): Declare new function.
(pinfo::zap_cwd): Move 'cd out of the way code' here.
(pinfo::exit): Use it here.
* spawn.cc (spawn_guts): And here.
Danny Smith [Thu, 10 Feb 2005 01:19:43 +0000 (01:19 +0000)]
2005-02-10 Jiri Malak <Jiri.Malak@iol.cz>
Danny Smith <dannysmith@users.sourceforge.net>
* lib/directx/dinput_private.h (ATTRIBUTE_TEXT_SECTION): New
define for Open Watcom portability.
* lib/directx/(dinput_joy.c, dinput_joy2.c, dinput_kbd.c,
dinput_mouse.c, dinput_mouse2.c): Use new macro in definition
of local c_rgodfDI* objects. Replace .rdata section attribute
with 'const' keyword in definition of global c_dfDI* objects.
Jan Beulich [Wed, 9 Feb 2005 08:05:43 +0000 (08:05 +0000)]
gas/testsuite/
2005-02-09 Jan Beulich <jbeulich@novell.com>
* gas/i386/intelok.s: Remove comments disabling alternative forms of
fbld, fbstp, and fldcw.
* gas/i386/intelok.d: Expect two instances of fbld, fbstp, and fldcw.
include/opcode/
2005-02-09 Jan Beulich <jbeulich@novell.com>
PR gas/707
* i386.h (i386_optab): Add x_Suf to fbld and fbstp. Add w_Suf and
FloatMF to fldcw, fstcw, fnstcw, and the memory formas of fstsw and
fnstsw.
* times.cc (timeval_to_filetime): Define first parameter const.
(utimes): Define second parameter to const according to SUSv3.
(utime): Ditto.
* include/sys/utime.h (utime) : Change declaration accordingly.
* libc/include/pwd.h (struct passwd): Change pw_uid and pw_gid
members to uid_t and gid_t according to SUSv3.
* libc/include/sys/time.h (utimes): Change second parameter
to const according to SUSv3.
Jeff Johnston [Tue, 8 Feb 2005 01:05:50 +0000 (01:05 +0000)]
2005-02-07 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/findfp.c (__sinit): Protect with new lock.
(__sinit_lock): New lock.
(__sinit_lock_acquire, __sinit_lock_release): New functions.
* libc/stdio/local.h: Add reference to new __sinit locking
functions.
* exceptions.cc: Make windows_system_directory non-static.
* pinfo.cc (pinfo::exit): Change innocuous cd'ed location to one that is more
likely to exist.
* cygthread.h (cygthread::terminate_thread): Reflect return value.
* cygthread.cc (cygthread::detach): Be more careful about ensuring that sigwait
is properly waited for to avoid later missynchronization.
(cygthread::terminate_thread): Return true if thread was actually terminated
and all handles were closed.
* fhandler_base.cc (fhandler_base::raw_read): Use signal_read_state rather than
raw calls to win32 api.
(fhandler_base::read): Ditto.
* fhandler.h (fhandler_pipe::fixup_after_exec): Use method to create read_state
signalling.
(fhandler_pipe::create): Ditto.
* Makefile.in: Make some more files -fomit-frame-pointer.
Alan Modra [Thu, 3 Feb 2005 03:30:38 +0000 (03:30 +0000)]
include/
* bfdlink.h (struct bfd_link_hash_entry): Add u.undef.weak.
bfd/
* linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
* elflink.c (elf_smash_syms): Restore symbols that were undefweak
before the as-needed lib was loaded. Abort on unexpected refs.
* cris/Makefile.in (ALL_INSTALL_FILES): New macro.
(ALL_INSTALL_FILES_NEWLIB_COPY): New macro.
(all): Use ALL_INSTALL_FILES instead of its contents. Add
ALL_INSTALL_FILES_NEWLIB_COPY.
($(objroot)/newlib/%, $(objroot)/newlib/libnosys.a): New rules
* cygthread.cc (cygthread::terminate_thread): Wait briefly for notification
event in the event that the thread was actually in the process of exiting.
* pipe.cc (fhandler_pipe::dup): read_state is not supposed to be inheritable.
Fix that.
* path.cc (path_conv::check): Set symlen = 0 to avoid a compiler warning.
* devices.h (devices::parsedisk): Declare new function.
* devices.in (devices::parsedisk): Define new function.
* dtable.cc (dtable::init_std_file_from_handle): Use device numbers rather than
name.
* fhandler_proc.cc (format_proc_partitions): Use parsedisk to generate disk
names from numeric codes. (This was broken on two of my systems previously and
is still broken now)
* fhandler.cc (fhandler_base::get_proc_fd_name): Don't generate
"device:" entry.
* fhandler.h (fhandler_socket::open): New method.
(fhandler_pipe::open): New method.
* fhandler_proc.cc (fhandler_proc::exists): Return -2 in case of
/proc/self.
* fhandler_process.cc (fhandler_process::exists): Return -2 in
case of symlinks, -3 for pipes and -4 for sockets.
(fhandler_process::fstat): Handle pipes and sockets.
(fhandler_process::open): Handle opening /proc/<pid>/fd.
(fhandler_process::fill_filebuf): Generate empty names for
non exisiting file descriptors.
* fhandler_socket.cc (fhandler_socket::get_proc_fd_name): Always
generate "socket:[number]" strings as on Linux.
(fhandler_socket::open): New method.
(fhandler_socket::fstat): Always return socket type.
* path.cc (symlink_info::set): Remove unused second parameter.
(path_conv::check): Handle pipes and sockets in /proc.
Set correct device type for AF_LOCAL sockets.
* pinfo.cc (_pinfo::commune_recv): Generate empty names for
non exisiting file descriptors.
(_pinfo::fd): Ditto.
* pipe.cc (fhandler_pipe::open): New method.
* smallprint.c (rnarg): New macro.
(rnargLL): Ditto.
(__rn): Rename from 'rn', add a mask argument, and use the mask argument to
control how many significant digits to care about.
(__small_vsprintf): Use __rn, rnarg, rnargLL, as appropriate.
Corinna Vinschen [Mon, 31 Jan 2005 10:28:55 +0000 (10:28 +0000)]
* cygheap.h (class cygheap_fdenum): New class to enumerate used
fhandlers.
* dtable.h (class dtable): Add cygheap_fdenum as friend class.
* fhandler.h (fhandler_base::get_proc_fd_name): New virtual method
to return a name for /proc/<pid>/fd.
(fhandler_socket::get_proc_fd_name): Ditto.
(fhandler_pipe::get_proc_fd_name): Ditto.
(fhandler_virtual::opendir): Make virtual method.
(fhandler_process::opendir): New method.
* fhandler.cc (fhandler_base::get_proc_fd_name): New method.
* fhandler_process.cc: Include ctype.h.
(PROCESS_FD): Define.
(process_listing): Add "fd".
(fhandler_process::exists): Fix comment. Return 1 in case of "fd"
directory. Handle files below "fd".
(fhandler_process::fstat): Drop "self" handling. Set correct link
count for directories.
(fhandler_process::opendir): New method to handle "fd" directory.
(fhandler_process::readdir): Add "fd" handling.
(fhandler_process::open): Drop "self" handling.
(fhandler_process::fill_filebuf): Ditto. Add "fd" handling. Fix
"maps" output string.
* fhandler_registry.cc (fhandler_registry::fstat): Set correct link
count for directories.
* fhandler_socket.cc (fhandler_socket::get_proc_fd_name): New method.
* path.cc (symlink_info::set): Fix thinko.
* pinfo.cc (_pinfo::commune_recv): Rename pathbuf to path throughout.
Drop local path variable in PICOM_FIFO case. Fix debug output.
Close handles as early as possible. Add PICOM_FDS and PICOM_FD
handling.
(_pinfo::commune_send): Add PICOM_FDS and PICOM_FD handling.
(_pinfo::fd): New method.
(_pinfo::fds): New method.
* pinfo.h (enum picom): Add PICOM_FDS and PICOM_FD.
(_pinfo::fd): Declare.
(_pinfo::fds): Declare.
* pipe.cc (fhandler_pipe::get_proc_fd_name): New method.
Corinna Vinschen [Sat, 29 Jan 2005 13:34:34 +0000 (13:34 +0000)]
* smallprint.c (rn): Change uval to unsigned long long to fix 64 bit
handling.
* fhandler_process.cc (format_process_maps): Print major, minor and
inode numbers correctly.
* configure.in (noconfigdirs) <crisv32-*-*>: Match like cris-*-*.
<crisv32-*-*, cris-*-*>: Only disable target-newlib and
target-libgloss when not *-*-elf and *-*-aout.
* configure: Regenerate.
* callback.h (struct host_callback_struct): New members pipe,
pipe_empty, pipe_nonempty, ispipe, pipe_buffer and
target_sizeof_int.
(CB_SYS_pipe): New macro.
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.